mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-27 12:04:03 +03:00
3802572a88
* Bump python in /{{cookiecutter.project_slug}}/compose/production/django Bumps python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye in /{{cookiecutter.project_slug}}/compose/local/django (#4544) Bumps python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye in /{{cookiecutter.project_slug}}/compose/local/docs (#4545) Bumps python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Heroku runtime to Python 3.11.5 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
63 lines
1.7 KiB
Docker
63 lines
1.7 KiB
Docker
# define an alias for the specific python version used in this file.
|
|
FROM python:3.11.5-slim-bullseye as python
|
|
|
|
|
|
# Python build stage
|
|
FROM python as python-build-stage
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
# dependencies for building Python packages
|
|
build-essential \
|
|
# psycopg2 dependencies
|
|
libpq-dev \
|
|
# cleaning up unused files
|
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Requirements are installed here to ensure they will be cached.
|
|
COPY ./requirements /requirements
|
|
|
|
# create python dependency wheels
|
|
RUN pip wheel --no-cache-dir --wheel-dir /usr/src/app/wheels \
|
|
-r /requirements/local.txt -r /requirements/production.txt \
|
|
&& rm -rf /requirements
|
|
|
|
|
|
# Python 'run' stage
|
|
FROM python as python-run-stage
|
|
|
|
ARG BUILD_ENVIRONMENT
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
# To run the Makefile
|
|
make \
|
|
# psycopg2 dependencies
|
|
libpq-dev \
|
|
# Translations dependencies
|
|
gettext \
|
|
# Uncomment below lines to enable Sphinx output to latex and pdf
|
|
# texlive-latex-recommended \
|
|
# texlive-fonts-recommended \
|
|
# texlive-latex-extra \
|
|
# latexmk \
|
|
# cleaning up unused files
|
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# copy python dependency wheels from python-build-stage
|
|
COPY --from=python-build-stage /usr/src/app/wheels /wheels
|
|
|
|
# use wheels to install python dependencies
|
|
RUN pip install --no-cache /wheels/* \
|
|
&& rm -rf /wheels
|
|
|
|
COPY ./compose/local/docs/start /start-docs
|
|
RUN sed -i 's/\r$//g' /start-docs
|
|
RUN chmod +x /start-docs
|
|
|
|
WORKDIR /docs
|