forked from pyvec/python.cz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (27 loc) · 777 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This Dockerfile allows you to run python.cz website easily and without
# issues with dependencies - locally, on your server or in cloud like now.sh.
# That's handy for testing or for demonstration of new feature in a pull request.
#
# For running the website locally:
#
# docker build -t python.cz .
# docker run -p 8000:8000 python.cz
#
# ...and open in your browser: http://localhost:8000
#
# Environment variables can be specified too>
#
# docker run -p 8000:8000 -e GITHUB_TOKEN=token123 python.cz
FROM python:3.4-alpine
RUN python3 -m venv /venv
RUN /venv/bin/pip install gunicorn
WORKDIR /app
COPY . ./
RUN /venv/bin/pip install -e .
EXPOSE 8000
CMD [ \
"/venv/bin/gunicorn", \
"--bind", "0.0.0.0:8000", \
"--workers", "4", \
"pythoncz:app" \
]