From: Sam Saffron Date: Tue, 7 Jan 2014 05:26:29 +0000 (-0800) Subject: add test that ensures bootstrap can not run when postgres is running X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d7ed7814e9365d80add794811cac2888c7d6c344;p=discourse_docker.git add test that ensures bootstrap can not run when postgres is running --- diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 40f41a2..1c83fc7 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -29,6 +29,14 @@ hooks: to: sv start postgres || exit 1 run: + # temporary + - exec: apt-get install -y socat + - exec: mkdir -p /shared/postgres_run + - exec: chown postgres:postgres /shared/postgres_run + - exec: chmod 775 /shared/postgres_run + - exec: rm -fr /var/run/postgresql + - exec: ln -s /shared/postgres_run /var/run/postgresql + - exec: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 - file: path: /etc/service/postgres/run chmod: "+x"