aboutsummaryrefslogtreecommitdiffstats
path: root/build/test/gondul-db-test.Dockerfile
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-05-13 20:18:36 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-05-13 20:18:36 +0200
commita79c9135fc2ed27b8d2374ab9728124f2357d2f1 (patch)
tree80ff92229bdc51638c7709a8892bbddc61abb504 /build/test/gondul-db-test.Dockerfile
parentafe950d0ef2d6cb192bbe2a1013be5915c47eaaa (diff)
Move stuff from /opt/nms to /opt/gondul etc
Still lots to do
Diffstat (limited to 'build/test/gondul-db-test.Dockerfile')
-rw-r--r--build/test/gondul-db-test.Dockerfile10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/test/gondul-db-test.Dockerfile b/build/test/gondul-db-test.Dockerfile
new file mode 100644
index 0000000..2e0e0ce
--- /dev/null
+++ b/build/test/gondul-db-test.Dockerfile
@@ -0,0 +1,10 @@
+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
+RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf
+CMD pg_ctlcluster --foreground 9.4 main start
+EXPOSE 5432