From 5f5178c751846363406922d23fab8f57a38ac1bc Mon Sep 17 00:00:00 2001 From: Benjamin DeLong Date: Fri, 4 Jan 2019 17:30:09 -0400 Subject: [PATCH] dockerfile and env example --- .gitignore | 1 + Dockerfile | 27 +++++++++++++++++++++++++++ env-example | 5 +++++ 3 files changed, 33 insertions(+) create mode 100644 Dockerfile create mode 100644 env-example diff --git a/.gitignore b/.gitignore index 1075296..0769c4f 100644 --- a/.gitignore +++ b/.gitignore @@ -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 index 0000000..6d07a1a --- /dev/null +++ b/Dockerfile @@ -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 index 0000000..c55e4b1 --- /dev/null +++ b/env-example @@ -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 -- 2.50.1