-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 800 Bytes
/
Dockerfile
File metadata and controls
36 lines (23 loc) · 800 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
FROM python:3.13-slim
WORKDIR /app
RUN groupadd -r appuser && useradd -r -g appuser appuser
RUN apt-get update && apt-get install -y \
postgresql-client \
libpq-dev \
gcc \
redis-tools \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen
COPY . .
RUN mkdir -p staticfiles mediafiles
RUN mkdir -p /home/appuser/.cache/uv
RUN chown -R appuser:appuser /app /home/appuser
EXPOSE 8000
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY docker-entrypoint-celery.sh /docker-entrypoint-celery.sh
RUN chmod +x /docker-entrypoint.sh /docker-entrypoint-celery.sh
USER appuser
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["uv", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]