Files
Django_kube/infra/production/dockerfile
T
pierre geeraert c79168453b
Dockerfile testing runner / Explore-Gitea-Actions (push) Failing after 3m17s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4s
remove tryton reference
2026-10-13 23:46:13 +01:00

31 lines
858 B
Docker

FROM python:3.12
ENV PYTHONUNBUFFERED 1
#ENV ALLOWED_HOSTS 'django.geeraert.eu'
#ENV DEBUG 'True'
ARG ALLOWED_HOSTS
ARG DEBUG
ENV ALLOWED_HOSTS=$ALLOWED_HOSTS
ENV DEBUG=$DEBUG
WORKDIR /code/
# Copy only the requirements file first (Changes infrequently)
COPY requirements.txt ./
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
COPY . ./
COPY infra/production/entrypoint.sh /code/entrypoint.sh
RUN chmod +x /code/entrypoint.sh
ENTRYPOINT ["/code/entrypoint.sh"]