2026-01-13 20:58:05 -05:00
|
|
|
FROM python:3.13-slim
|
|
|
|
|
|
|
|
|
|
RUN python -m venv /.venv
|
|
|
|
|
ENV PATH="/.venv/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
|
|
|
|
RUN pip install -r /tmp/requirements.txt
|
|
|
|
|
|
|
|
|
|
COPY src /src
|
2026-01-27 23:32:16 -05:00
|
|
|
RUN rm -rf /src/static
|
2026-01-13 20:58:05 -05:00
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
2026-01-27 23:32:16 -05:00
|
|
|
RUN python manage.py collectstatic --noinput
|
2026-01-13 20:58:05 -05:00
|
|
|
|
|
|
|
|
ENV DJANGO_DEBUG_FALSE=1
|
|
|
|
|
|
2026-03-02 22:23:58 -05:00
|
|
|
RUN DJANGO_SECRET_KEY=build-dummy DJANGO_ALLOWED_HOST=localhost python manage.py compress
|
2026-03-02 16:02:47 -05:00
|
|
|
|
2026-01-13 20:58:05 -05:00
|
|
|
RUN adduser --uid 1234 nonroot
|
|
|
|
|
|
|
|
|
|
USER nonroot
|
2026-03-18 22:03:10 -04:00
|
|
|
CMD ["gunicorn", "--bind", ":8888", "-k", "uvicorn.workers.UvicornWorker", "core.asgi:application"]
|