diff options
| author | 2023-05-14 23:54:51 +0530 | |
|---|---|---|
| committer | 2023-05-14 23:54:51 +0530 | |
| commit | a241a397f966a4265935dfd5c92a84fdf95c52c8 (patch) | |
| tree | 83f6eb572e26e64e6ca18642013abf60f1b23d8b /Dockerfile | |
| parent | Update pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md (diff) | |
| parent | Merge pull request #972 from python-discord/fix-psycopg3-compatibility-in-met... (diff) | |
Merge branch 'main' into subclassing_bot
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 --only main # 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"] |