Skip to content

Commit b49fb1c

Browse files
committed
Add Dockerfile
1 parent f24977d commit b49fb1c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM python:3.10
2+
3+
WORKDIR /app
4+
5+
COPY requirements/ requirements/
6+
COPY requirements.txt .
7+
RUN pip install -r requirements.txt
8+
9+
COPY . .
10+
11+
ENV NUM_WORKERS=4
12+
13+
ARG SOCKFILE
14+
15+
CMD ["sh", "-c", "gunicorn config.asgi:application \
16+
--name django-backend \
17+
--workers $NUM_WORKERS \
18+
-k uvicorn.workers.UvicornWorker \
19+
--bind unix:$SOCKFILE \
20+
--log-llevel=debug \
21+
--log-file=/app/logs/gunicorn.log"]

0 commit comments

Comments
 (0)