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 '')
-rw-r--r--docker-compose.yml13
-rw-r--r--docker/Dockerfile.webapp25
2 files changed, 38 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index 11dad71..667a700 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -14,5 +14,18 @@ services:
environment:
RMQ_HOST: pdrmq
+ pdsnekboxweb:
+ hostname: "pdsnekboxweb"
+ image: pythondiscord/snekboxweb:latest
+ networks:
+ - sneknet
+ ports:
+ - "5000:5000"
+ expose:
+ - "5000"
+ environment:
+ RMQ_HOST: pdrmq
+
+
networks:
sneknet:
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"]