Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
Latest commit
40 lines (27 loc) · 742 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (27 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.13.3 AS base
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN apt-get update \
&& apt-get install -y \
git \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
COPY ./requirements.txt .
COPY ./requirements-dev.txt .
RUN pip install -r requirements-dev.txt
FROM base AS collectstatic
COPY . .
RUN DJANGO_STATIC_ROOT=/static python manage.py collectstatic --no-input
RUN find /static -ls
FROM ghcr.io/static-web-server/static-web-server:2.37.0 AS static-server
WORKDIR /srv/http
ENV SERVER_ROOT=/srv/http
COPY --from=collectstatic /static /srv/http/static
FROM base AS dev
ENV RUN_MODE=dev
COPY ./entrypoint.sh .
ENTRYPOINT ["/app/entrypoint.sh"]
FROM dev AS server
ENV RUN_MODE=prod
COPY . .