Installation

From SynBioHubWiki
Jump to: navigation, search

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

Install Docker

First, install Docker and Docker Compose.

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.

On Ubuntu, start docker using:

systemctl start docker

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

Configuring

On first startup, you will be taken to the SynBioHub Setup Page, which enables basic setup of the site. After first setup, the Admin Portal will allow admin users to update their site configuration.

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.

Updating

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

From Source

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

npm start

If you are doing development work, you can start SynBioHub with the command

npm run-script dev

which will restart the application with any change to the JavaScript source.

Publishing Instance

Nginx is used for the reference instance. NGINX configuration instructions




Newcastle-university.png Icos.png University-utah.png   AntarcticDesign.png