Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
messa committed Sep 1, 2017
1 parent d7a723d commit 9c2091d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
@@ -0,0 +1,3 @@
.git
__pycache__
*.egg-info
31 changes: 31 additions & 0 deletions Dockerfile
@@ -0,0 +1,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" \
]

0 comments on commit 9c2091d

Please sign in to comment.