SkyPortal can be deployed either with or without using Docker. Without Docker, all services (such as the database) need to be running locally, as described in setup.
More commonly, production deployment will use Docker images. Here, we discuss how to deploy via docker-compose, but much of the same information applies when using Kubernetes, for which we have an example deployment.
Building the Docker images¶
The first step is to obtain the images to launch. We deploy SkyPortal images to Docker Hub from time to time, which you can fetch using:
docker pull skyportal/web
Otherwise, you may build the images from scratch:
Next, we deploy two containers:
web (the SkyPortal application) and
db (the PostgreSQL server). The database is stored in a local
docker volume called
docker volume ls).
docker-compose up -d
Once both services are up and running, you may browse to SkyPortal at
You can see which containers are running with
Inspect the logs for the running containers using:
docker-compose logs web docker-compose logs db
(Or, follow the logs with
docker-compose logs -f db.)
Adding test data¶
To add some test data to play with, run:
docker-compose run web bash -c 'source /skyportal_env/bin/activate && make load_demo_data'
Stopping the deployment¶
You may stop both containers using:
Or stop and remove them using:
This does not affect data, which lives in the