-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (36 loc) · 1.01 KB
/
Dockerfile
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
45
46
47
48
FROM python:3.12
EXPOSE 8888
ENV DJANGO_SETTINGS_MODULE="config.settings.docker"
ARG DJANGO_SECRET_KEY="notneededforbuilds"
ARG DATABASE_URL="postgres://not@neededforbuilds"
ARG DOCKER_TAG="latest"
ENV DOCKER_TAG=$DOCKER_TAG
ARG SOURCE_COMMIT="HEAD"
ENV SOURCE_COMMIT=$SOURCE_COMMIT
COPY scripts/entrypoint /usr/local/bin/entrypoint
RUN chmod a+x /usr/local/bin/entrypoint
WORKDIR /app
ADD requirements.txt /app/requirements.txt
RUN python -m pip install --no-cache-dir -r requirements.txt
ADD . /app/
RUN python manage.py collectstatic --noinput
RUN groupadd -g 1001 modeemintternet
RUN useradd -u 1001 -g 1001 -d /app modeemintternet
USER modeemintternet
ENTRYPOINT ["/usr/local/bin/entrypoint"]
CMD [ \
"gunicorn", \
"--name", \
"modeemintternet", \
"--access-logfile", \
"-", \
"--access-logform", \
"%({X-Forwarded-For}i)s %(l)s %(u)s %(t)s '%(r)s' %(s)s %(b)s '%(f)s' '%(a)s'", \
"--log-level", \
"info", \
"--workers", \
"2", \
"--bind", \
"0.0.0.0:8888", \
"config.wsgi:application" \
]