#!/bin/bash # The init of docker image; this starts postgres, upgrades DaCHS, and # runs some regression tests. # # Yes, this is running postgres and DaCHS in one container. This is about # integration testing, not deployment, so best practices go to hell. # postgres needs this directory for log files; then start postgres usr/bin/pg_ctlcluster $PGVERSION main start apt-get -y update while ! /usr/bin/pg_ctlcluster $PGVERSION main status > /dev/null; do sleep 5; echo "Waiting for database to come up" done DEBIAN_FRONTEND='noninteractive' apt-get upgrade -y gavo serve start gavo test ALL # give control to the user so they can inspect if something went wrong. exec bash