-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (26 loc) · 749 Bytes
/
Copy pathDockerfile
File metadata and controls
44 lines (26 loc) · 749 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
41
42
43
44
FROM python:3.13-slim AS django
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app/main
ENV DJANGO_SETTINGS_MODULE=main.settings
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
netcat-openbsd \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv
COPY pyproject.toml uv.lock* /app/
WORKDIR /app
RUN uv sync --no-dev --frozen --no-install-project
ENV PATH="/app/.venv/bin:$PATH"
COPY . /app/
WORKDIR /app/main
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]
FROM nginx:1.27-alpine AS nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80