diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3225a20 --- /dev/null +++ b/.dockerignore @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..436d65e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/pluralityspace/settings.py b/pluralityspace/settings.py index 43ebab8..db3c551 100644 --- a/pluralityspace/settings.py +++ b/pluralityspace/settings.py @@ -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/ # 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-#' # SECURITY WARNING: don't run with debug turned on in production! diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d3e4ba5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +django