Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.git | ||
__pycache__ | ||
*.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" \ | ||
] |