-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 706 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (18 loc) · 706 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
FROM python:3.12-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
RUN groupadd --gid 1000 coursemc \
&& useradd --uid 1000 --gid coursemc --create-home coursemc
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --upgrade pip \
&& python -m pip install -r /app/requirements.txt
COPY --chown=coursemc:coursemc . /app
RUN mkdir -p /app/staticfiles /app/media /app/private_media \
&& chown -R coursemc:coursemc /app
USER coursemc
EXPOSE 8000
ENTRYPOINT ["/app/deploy/entrypoint.sh"]
CMD ["gunicorn", "CourseMC.wsgi:application", "--config", "/app/deploy/gunicorn.conf.py"]