-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (33 loc) · 967 Bytes
/
Dockerfile
File metadata and controls
50 lines (33 loc) · 967 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
45
46
47
48
49
50
# FROM python:3.10-alpine
FROM python:3.12.12-alpine
WORKDIR /app
# RUN apk update && apk add --no-cache gcc musl-dev mysql-dev git shadow
RUN apk update && apk add --no-cache \
gcc \
musl-dev \
mysql-dev \
git \
shadow \
cairo-dev \
cairo \
pango-dev \
gdk-pixbuf-dev \
libffi-dev \
jpeg-dev \
zlib-dev \
freetype-dev \
curl
RUN groupadd -r cystack && useradd -r -g cystack -s /usr/sbin/nologin -c "CyStack user" cystack
RUN pip install --upgrade pip
RUN pip install wheel==0.45.1
COPY requirements.txt ./
RUN pip install -r requirements.txt
EXPOSE 8000
COPY . /app
RUN mkdir media
RUN chown -R cystack: media
USER cystack
ENV PROD_ENV prod
CMD python manage.py migrate; gunicorn -w 3 -t 120 -b 0.0.0.0:8000 server_config.wsgi:application & daphne -b 0.0.0.0 -p 8001 server_config.asgi:application || true
# || true & python cron_task.py || true
# & python manage.py rqworker default || true