aboutsummaryrefslogtreecommitdiffstats
path: root/build/test/nms-db-test.Dockerfile
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-04-13 22:02:12 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-04-13 22:02:12 +0200
commit0015584a620c8505140f4a13567dd77265278a45 (patch)
treea7b4d4cdc1dae6bb6d3cc4c39cda022a12b15a49 /build/test/nms-db-test.Dockerfile
parentc3f914cd2cda564150f79f810e9e68ca521fcfe2 (diff)
test: Simplify playbook
Diffstat (limited to 'build/test/nms-db-test.Dockerfile')
-rw-r--r--build/test/nms-db-test.Dockerfile10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/test/nms-db-test.Dockerfile b/build/test/nms-db-test.Dockerfile
new file mode 100644
index 0000000..a182040
--- /dev/null
+++ b/build/test/nms-db-test.Dockerfile
@@ -0,0 +1,10 @@
+FROM debian:jessie
+RUN apt-get update && apt-get install -y postgresql-9.4
+ADD 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 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