diff options
author | 2019-09-18 04:03:18 +1000 | |
---|---|---|
committer | 2019-09-18 05:22:17 +1000 | |
commit | b03685fb5c430cf836abd7f9b184a2a094f29819 (patch) | |
tree | 96cfcde6031d1afaef5ccf8547c9d1dba111299a /docker/app/local.Dockerfile | |
parent | Add test cases for `TypeError` fallbacks. (diff) |
Refine Dockerfiles
Diffstat (limited to '')
-rw-r--r-- | docker/app/local.Dockerfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docker/app/local.Dockerfile b/docker/app/local.Dockerfile new file mode 100644 index 00000000..2edf4794 --- /dev/null +++ b/docker/app/local.Dockerfile @@ -0,0 +1,23 @@ +FROM bitnami/python:3.7-prod + +STOPSIGNAL SIGQUIT +ARG EXTRAS=deploy + +# Create a user. +RUN useradd --system --shell /bin/false --uid 1500 pysite + +# Install prerequisites needed to complete the dependency installation. +RUN install_packages git uwsgi + +# Copy the project files into the working directory. +WORKDIR /app +COPY . . + +# Update setuptools by removing egg first, add other dependencies +RUN rm -r /opt/bitnami/python/lib/python3.*/site-packages/setuptools* && \ + pip install --no-cache-dir -U setuptools pipenv +RUN pipenv install --system --deploy + +RUN SECRET_KEY=placeholder DATABASE_URL=sqlite:// python3 manage.py collectstatic --no-input --clear --verbosity 0 + +CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"] |