#!/bin/bash # The init of docker image; this essentially starts postgres and installs # DaCHS and the packages maintained by us. # # Yes, this is running postgres and DaCHS in one container. This is about # integration testing, not deployment, so best practices go to hell. export PGVERSION=13 # no idea why Debian sometime configures postgres' port to 5433. # There's no other cluster here. Anyway, I'll hack this sed -ie 's/port = 5433/port = 5432/' /etc/postgresql/$PGVERSION/main/postgresql.conf /usr/bin/pg_ctlcluster $PGVERSION main start while ! /usr/bin/pg_ctlcluster $PGVERSION main status > /dev/null; do sleep 5; echo "Waiting for database to come up" done # postgres should be up by now; create a root role for easy inspection # when something goes wrong. su - postgres -c "createuser -s root" # I've not found the podman option to do that (or something better) from there: chmod -R 777 /var/gavo-inputs # now install the server apt-get update apt-get install -y gavodachs2-server # now overwrite with the backport in the filesystem dpkg -i /package/*.deb # and stop the server, as we want it running as dachsroot later dachs serve stop # prepare the test script cd /home/dachsroot cat > dachstest.sh <