add Dockerfile, .dockerignore, requirements.txt

This commit is contained in:
Lexi / Zoe 2019-09-24 02:02:51 +02:00
parent a4ef7a72e8
commit 024940243d
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
4 changed files with 46 additions and 0 deletions

27
.dockerignore Normal file
View File

@ -0,0 +1,27 @@
# Git metadata
.git
.gitignore
# IDE stuff
.idea/
.vscode/
# Python / Django
*.log
*.pot
*.pyc
.cache
__pycache__/
local_settings.py
db.sqlite3
# Environments
.python-version
.env
.venv
env/
venv/
# Installer logs
pip-log.txt
pip-delete-this-directory.txt

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM alpine:3.7
EXPOSE 8042
WORKDIR /usr/src/app
RUN apk add --no-cache \
python3 \
py3-gunicorn
COPY requirements.txt .
RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt
COPY . .
CMD ["gunicorn", "pluralityspace.wsgi:application", \
"--bind", "0.0.0.0:8042"]

View File

@ -20,6 +20,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
# TODO change this (issue #2)
SECRET_KEY = 'pf2m=go(3m85v*@&i@$t_5&ocgth@pi1abhqito1*q8d&m&r-#' SECRET_KEY = 'pf2m=go(3m85v*@&i@$t_5&ocgth@pi1abhqito1*q8d&m&r-#'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
django