Skip to content

Commit

Permalink
added Dockerfile and .dockerignore
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-peters committed Mar 17, 2021
1 parent 81e15de commit 34dded2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests/
.flake8
.flaskenv
LICENSE
README.md
tox.ini

venv/
htmlcov/
.coverage
__pycache__/
*.egg-info
.tox/
*.br
*.gz
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.9.2-slim-buster

ENV PORT=5000 \
WEB_CONCURRENCY=3

WORKDIR /app

COPY . .

RUN pip install -r requirements.txt

# compress static files
RUN python -m whitenoise.compress ./strong_but_simple_passwords/static/

CMD gunicorn "strong_but_simple_passwords:create_app()" --bind 0.0.0.0:$PORT --log-file -

0 comments on commit 34dded2

Please sign in to comment.