aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-05-22 23:00:05 +0200
committerGravatar Christopher Baklid <[email protected]>2018-05-22 23:00:05 +0200
commit6f253e8f8ac56f70582853eb8fd2b39d07fa1b34 (patch)
treed57a8f869648fb77ea427c33f197b9c68b2bd58e /docker
parentadds webapp and docker-compose for more proof of concept (diff)
puts the webapp in a docker container and puts it in docker-compose
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile.webapp25
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/Dockerfile.webapp b/docker/Dockerfile.webapp
new file mode 100644
index 0000000..ea06f20
--- /dev/null
+++ b/docker/Dockerfile.webapp
@@ -0,0 +1,25 @@
+FROM python:3.6-alpine3.7
+
+RUN apk add --update tini
+RUN apk add --update build-base
+
+ENV PIPENV_VENV_IN_PROJECT=1
+ENV PIPENV_IGNORE_VIRTUALENVS=1
+ENV PIPENV_NOSPIN=1
+ENV PIPENV_HIDE_EMOJIS=1
+ENV PYTHONPATH=/webapp
+
+RUN pip install pipenv
+
+RUN mkdir -p /webapp
+COPY Pipfile /webapp
+COPY Pipfile.lock /webapp
+COPY webapp /webapp
+WORKDIR /webapp
+
+RUN pipenv sync --dev
+
+EXPOSE 5000
+
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD ["pipenv", "run", "webapp"]