...
Pull your Docker image and other relevant file from GitHub. Once pulled, navigate to your project folder and you'll see multiple docker. To keep your service from blocking the console, you should run your Docker in detached mode using the -d option.
Now you can log out and the service will continue running on the EC2 instance.
Note: You must specify which .yml file to use when launching docker. See details at Domains of backend APIs and SSL > "Specify which yml file to use when launching docker on production and test environment"
Common Issues
BioHPC database timeout
If you are experiencing timeout when connecting to the BioHPC database, it' probably because the EC2 instance isn't connected to Cornell's VPN. To connect to the VPN, run the following command
| Code Block |
|---|
openconnect -b cuvpn.cuvpn.cornell.edu |
and enter necessary information as prompted.
Specify which yml file to use when launching docker on production and test environment
Separate docker-compose config files named docker-compose-prod.yml and docker-compose-test.yml are created.
Since only production and test environment will use this cert. When launching docker, must specify this yml file.
Command Line
run the Docker using docker-compose up with the corresponding yml file:
| Code Block |
|---|
// For production at 35.168.248.57 sudo docker-compose -f docker-compose-prod.yml up -d // For test at 3.232.82.82 sudo docker-compose -f docker-compose-test.yml up -d // For local development on your laptop // These two commands are equivalents (i.e. default is docker-compose.yml) sudo docker-compose -f docker-compose.yml up -d sudo docker-compose up -d |
We have different yml files because production and test environments use different SSL certificates. To keep your service from blocking the console, you should run your Docker in detached mode using the -d option.
Now you can log out and the service will continue running on the EC2 instance.
Common Issues
BioHPC database timeout
If you are experiencing timeout when connecting to the BioHPC database, it' probably because the EC2 instance isn't connected to Cornell's VPN. To connect to the VPN, run the following command
| Code Block |
|---|
openconnect -b cuvpn.cuvpn.cornell.edu |
and enter necessary information as prompted.