-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 769 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
FROM python:3.11
# Kept separate to be substituted in next step
ENV APP_ROOT=/app
ENV DJANGO_SETTINGS_MODULE=cafesys.settings.production \
PYTHONPATH=${APP_ROOT}:${PYTHONPATH} \
PYTHONUNBUFFERED=true
# Build-only environment variables
ARG DJANGO_DATABASE_URL=sqlite:////
ARG DJANGO_DEBUG=False
ARG DJANGO_EMAIL_URL=consolemail://
ARG DJANGO_REDIS_URL=redis://
ARG DJANGO_SECRET_KEY=build
RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}
RUN pip3 install -U pip setuptools
COPY ./requirements.txt ${APP_ROOT}/requirements.txt
RUN pip3 install --ignore-installed -r ${APP_ROOT}/requirements.txt
COPY ./bin ./bin
COPY ./cafesys ./cafesys
COPY ./gunicorn-conf.py ./gunicorn-conf.py
COPY ./manage.py ./manage.py
EXPOSE 5006
RUN django-admin collectstatic --noinput