Some information on how to deploy the website - currently it is deployed on a heicloud VM.
Production docker container images are automatically built by CI. To deploy the latest version on a virtual machine with docker-compose installed, download docker-compose.yml, then do
sudo docker-compose pull
sudo docker-compose up -d
The location of data directory, SSL keys and secret key should be set
either in env vars or in a file .env
in the same location as the docker-compose.yml.
For example the current deployment on heicloud looks like this:
SAMPLE_FLOW_DATA="/home/ubuntu/sample_flow/docker_volume"
SAMPLE_FLOW_SSL_CERT="/etc/letsencrypt/live/circuitseq.iwr.uni-heidelberg.de/fullchain.pem"
SAMPLE_FLOW_SSL_KEY="/etc/letsencrypt/live/circuitseq.iwr.uni-heidelberg.de/privkey.pem"
SAMPLE_FLOW_JWT_SECRET_KEY="abc123" # to generate a new secret key: `python -c "import secrets; print(secrets.token_urlsafe(64))"`
The current status of the containers can be checked with
sudo docker-compose ps
sudo docker-compose logs
Certbot attempts to auto-renew but this requires port 80, which is already taken by our web server. To update the certificate manually:
sudo docker-compose down
sudo certbot renew
sudo docker-compose up -d
To make an existing user with email [email protected]
into an admin, ssh into the VM, then
cd sample_flow
sudo sqlite3 docker_volume/SampleFlow.db
sqlite> UPDATE user SET is_admin=true WHERE email='[email protected]';
sqlite> .quit