]> granicus.if.org Git - postgresql-autodoc/commitdiff
dockerfile and env example
authorBenjamin DeLong <benjamin.delong@vineview.com>
Fri, 4 Jan 2019 21:30:09 +0000 (17:30 -0400)
committerBenjamin DeLong <benjamin.delong@vineview.com>
Fri, 4 Jan 2019 21:30:09 +0000 (17:30 -0400)
.gitignore
Dockerfile [new file with mode: 0644]
env-example [new file with mode: 0644]

index 1075296d892f7feb970b87f58ce9bb169cf583c0..0769c4fcf25e388d092983dc46ee269a492be8a4 100644 (file)
@@ -4,3 +4,4 @@ postgresql_autodoc
 config.status
 config.mk
 config.log
+env
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..6d07a1a
--- /dev/null
@@ -0,0 +1,27 @@
+# USAGE:
+# docker build . -t autodoc
+# docker run --mount src=`pwd`,target=/app,type=bind --network=host --env-file ./env -v $pwd:/app autodoc
+
+FROM ubuntu:18.04
+
+WORKDIR /app
+
+RUN apt-get update
+
+RUN apt-get install -y libdbi-perl \
+  libhtml-template-perl libterm-readkey-perl \
+  libdbd-pg-perl make
+
+COPY . .
+
+RUN make install
+
+ENV DATABASE=app \
+  HOST=localhost \
+  USER=app \
+  PASSWORD=password
+
+CMD postgresql_autodoc -d ${DATABASE} \
+  -h ${HOST} \
+  -u ${USER} \
+  --password=${PASSWORD}
\ No newline at end of file
diff --git a/env-example b/env-example
new file mode 100644 (file)
index 0000000..c55e4b1
--- /dev/null
@@ -0,0 +1,5 @@
+# Copy, rename to env, and fill in your db details
+DATABASE=app
+HOST=localhost
+USER=app
+PASSWORD=password
\ No newline at end of file