Skip to content
Ryan Govostes edited this page Apr 27, 2020 · 8 revisions

The preferred way to deploy Sealog Server is through Docker, using Docker Compose.

Development with Docker is possible but it is not necessarily recommended.

New images are automatically built and pushed to Docker Hub during continuous integration.

Installing Docker (Linux)

apt install python3 python3-pip libffi-dev libssl-dev
curl -fsSL https://get.docker.com | sh
pip3 install docker-compose

Running the Docker Image

You can pull a pre-built image from Docker Hub. See Continuous Integration and Branches and Tags for other tags besides latest.

docker pull whoi/ndsf-sealog-server:latest

If we don't have the docker-compose.yml file that describes other services (such as the database server) that Sealog depends on, we can extract it:

docker run --rm whoi/ndsf-sealog-server cat docker-compose.yml > docker-compose.yml

Modify the file so that the sealog-server service uses the whoi/ndsf-sealog-server:latest image (or appropriate tag). You could also use an override file, see section below for command line arguments.

Example docker-compose.override.yml
version: '3.6'

services:
  sealog-server:
    image: whoi/ndsf-sealog-server:latest

Now we can start and stop the server:

docker-compose up -d
docker-compose down

Building from Source

Simply run:

docker-compose build
docker-compose up -d
docker-compose down

Note that when built locally, the Sealog Server images are named oceandatatools/sealog-server and not whoi/ndsf-sealog-server.

Overriding Docker Compose settings

The docker-compose command automatically reads its configuration from docker-compose.yml. This configuration can be extended, see the documentation.

docker-compose -f docker-compose.yml -f docker-compose.override.yml <command>

This is preferred to making changes to the docker-compose.yml file that would not be appropriate to be merged upstream.

Running multiple instances

Services can be namespaces by providing the -p, --project-name NAME option to docker-compose. By default name spacing uses the basename of the current directory.

docker-compose -p sealog_jason <command>