SynBioHub is deployed using Docker. Docker is a platform that allows pre-configured applications to be deployed anywhere, allowing SynBioHub to be installed as a single image with no prerequisites other than Docker itself.
From Prebuilt Image
Ensure that the Docker daemon is running on your system before continuing. On Mac and Windows, a small whale icon in the system tray indicates Docker is running.
Starting a SynBioHub instance
Pull the docker-compose configuration and start SynBioHub with:
git pull https://github.com/synbiohub/synbiohub-docker docker compose up --file ./synbiohub-docker/docker-compose.yml
SendGrid email setup
In order to enable SynBioHub to send account-related emails, you need a SendGrid account and API key. Once you have created your account, you should click "Settings" in the left bar, then "API Keys". On the resulting page, click the "Create API Key" button in the upper-right corner, and give your new API key a name. You should see the key on the next page. Copy the key and paste it into the "SendGrid API Key" in the Mail page on the SynBioHub admin dashboard. Save the API key in SynBioHub and you are ready to begin sending email.
To update a container, pull the new version and start it.
docker-compose pull --file synbiohub-docker/docker-compose.yml synbiohub docker-compose up --file synbiohub-docker/docker-compose.yml --no-deps -d synbiohub
DATA CONSISTENCY WARNING
If you are updating from a version of SynBioHub earlier than 1.3.0 to 1.3.0 or later, you must execute the following steps to persist your data between instances!
docker exec synbiohub cp /opt/synbiohub/synbiohub.sqlite /mnt/data/synbiohub.sqlite docker exec synbiohub cp -R /opt/synbiohub/uploads /mnt/data/uploads docker exec synbiohub chown synbiohub /mnt/data/synbiohub.sqlite docker exec synbiohub chgrp synbiohub /mnt/data/synbiohub.sqlite docker exec synbiohub chown -R synbiohub /mnt/data/uploads docker exec synbiohub chgrp -R synbiohub /mnt/data/uploads
To update to the latest version of SynBioHub, first stop and remove the container:
docker stop synbiohub docker rm synbiohub
Then pull the latest version:
docker pull synbiohub/synbiohub:1.3.0
Finally, run a new container with the latest image:
docker run -v synbiohub:/mnt -p 7777:7777 --name synbiohub -d synbiohub/synbiohub:1.3.0
Follow the instructions on the GitHub README to install SynBioHub locally on your system. If you would like SynBioHub to run as a service, you can enable Virtuoso using systemd or open a virtual terminal using tmux or GNU screen and run
sudo /usr/local/bin/virtuoso-t +configfile $YOUR_CONFIG_FILE
You should also run SynBioHub as a system service or using a virtual terminal and the command
If you are doing development work, you can start SynBioHub with the command
npm run-script dev