diff options
| author | 2022-11-23 12:16:42 -0800 | |
|---|---|---|
| committer | 2022-11-23 12:16:42 -0800 | |
| commit | 0ff39f6cef7d889cc2e14918d65ffaaf05efec6f (patch) | |
| tree | 786ee6288cd0a7e02bd5480a1d12972bf8ccd796 /Dockerfile | |
| parent | Use 4 spaces as tab (diff) | |
| parent | Merge pull request #800 from python-discord/dependabot/pip/httpx-0.23.1 (diff) | |
Merge branch 'main' into discordpy-error-handling
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -1,21 +1,14 @@ -FROM --platform=linux/amd64 python:3.9-slim-buster +FROM ghcr.io/chrislovering/python-poetry-base:3.10-slim # Allow service to handle stops gracefully STOPSIGNAL SIGQUIT -# Set pip to have cleaner logs and no saved cache -ENV PIP_NO_CACHE_DIR=false \ - POETRY_VIRTUALENVS_CREATE=false - -# Install poetry -RUN pip install -U poetry - # Copy the project files into working directory WORKDIR /app # Install project dependencies COPY pyproject.toml poetry.lock ./ -RUN poetry install --no-dev +RUN poetry install --without dev # Set Git SHA environment variable ARG git_sha="development" @@ -34,14 +27,14 @@ RUN \ SECRET_KEY=dummy_value \ DATABASE_URL=postgres://localhost \ METRICITY_DB_URL=postgres://localhost \ - python manage.py collectstatic --noinput --clear + poetry run python manage.py collectstatic --noinput --clear # Build static files if we are doing a static build ARG STATIC_BUILD=false RUN if [ $STATIC_BUILD = "TRUE" ] ; \ - then SECRET_KEY=dummy_value python manage.py distill-local build --traceback --force ; \ + then SECRET_KEY=dummy_value poetry run python manage.py distill-local build --traceback --force ; \ fi # Run web server through custom manager -ENTRYPOINT ["python", "manage.py"] +ENTRYPOINT ["poetry", "run", "python", "manage.py"] CMD ["run"] |