aboutsummaryrefslogtreecommitdiffstats
path: root/build/test/gondul-db-test.Dockerfile
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-11-22 15:35:16 +0100
committerKristian Lyngstol <kly@kly.no>2016-11-22 15:35:16 +0100
commit4f756e45b8393d4388af9bb3b7ee34d2ef79b46d (patch)
tree38aa83689db61ea3291fb89791d277ae4961f1b1 /build/test/gondul-db-test.Dockerfile
parentc38af8933072bb2b9606cd6490e1a802ab4c4187 (diff)
Use persistent postgres storage and make grafana use postgres backing
Still need to fix session storage for Grafana. After that, the container is stateless.
Diffstat (limited to 'build/test/gondul-db-test.Dockerfile')
-rw-r--r--build/test/gondul-db-test.Dockerfile6
1 files changed, 2 insertions, 4 deletions
diff --git a/build/test/gondul-db-test.Dockerfile b/build/test/gondul-db-test.Dockerfile
index b3d013b..38febc6 100644
--- a/build/test/gondul-db-test.Dockerfile
+++ b/build/test/gondul-db-test.Dockerfile
@@ -2,10 +2,8 @@ FROM debian:jessie
RUN apt-get update && apt-get install -y postgresql-9.4
ADD build/test/pg_hba.tail /pg_hba.tail
RUN cat /pg_hba.tail >> /etc/postgresql/9.4/main/pg_hba.conf
-RUN service postgresql start && su postgres -c "psql --command=\"CREATE ROLE nms PASSWORD 'risbrod' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" && su postgres -c "createdb -O nms nms" && service postgresql stop
-ADD build/schema.sql /schema.sql
-RUN service postgresql start && su postgres -c "cat /schema.sql | psql nms" && service postgresql stop
ADD build/test/postgresql.conf /etc/postgresql/9.4/main/postgresql.conf
RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf
-CMD pg_ctlcluster --foreground 9.4 main start
+CMD /opt/gondul/build/test/postgres.sh
+VOLUME /var/lib/postgresql
EXPOSE 5432