aboutsummaryrefslogtreecommitdiffstats
path: root/build/test/db-test.Dockerfile
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-04-13 19:59:35 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-04-13 19:59:35 +0200
commit1818d660e9cf2142433fb0cafd5b66837d848ffc (patch)
tree9b78f6a9748db186689cf5b9d5d7fb701ad067ef /build/test/db-test.Dockerfile
parentee2ae15c9f4c8ea6426d90cf215720836627f1cd (diff)
Add schema and start build and test-framework
DB is looking OK so far in the test.
Diffstat (limited to 'build/test/db-test.Dockerfile')
-rw-r--r--build/test/db-test.Dockerfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/test/db-test.Dockerfile b/build/test/db-test.Dockerfile
new file mode 100644
index 0000000..cd6161e
--- /dev/null
+++ b/build/test/db-test.Dockerfile
@@ -0,0 +1,9 @@
+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
+CMD pg_ctlcluster --foreground 9.4 main start
+EXPOSE 5432