summaryrefslogtreecommitdiff
path: root/llp/Dockerfile.python
diff options
context:
space:
mode:
Diffstat (limited to 'llp/Dockerfile.python')
-rw-r--r--llp/Dockerfile.python28
1 files changed, 28 insertions, 0 deletions
diff --git a/llp/Dockerfile.python b/llp/Dockerfile.python
new file mode 100644
index 0000000..2a51966
--- /dev/null
+++ b/llp/Dockerfile.python
@@ -0,0 +1,28 @@
+# There is no base django image and instead they
+# suggest using the python base image. We're
+# going with the Debian Stretch base python 2.x
+# option for now as it's closest to what we
+# currently run
+FROM python:2.7.14
+
+ENV GUNICORN_WORKERS 4
+ENV WSGI_SCRIPT ${WSGI:-wsgi_production:application}
+ENV LLP_PORT ${LLP_PORT:-8000}
+ENV SITE_NAME ${SITE_NAME:-Protected Downloads}
+ENV DJANGO_SETTINGS_MODULE ${DJANGO_SETTINGS_MODULE:-settings_production}
+
+EXPOSE 8000
+VOLUME /srv
+
+ADD ./requirements.txt /tmp/requirements.txt
+ADD docker_init.sh /bin/docker_init.sh
+RUN chmod 755 /bin/docker_init.sh
+
+# install reqs
+RUN pip install -r /tmp/requirements.txt
+# add this manually for the docker environment
+RUN pip install gunicorn
+
+WORKDIR /srv/project
+
+CMD /bin/docker_init.sh