forked from NextStopLabs/MyBusTimes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 645 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (21 loc) · 645 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.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app/
ENV PYTHONUNBUFFERED=1
CMD ["gunicorn", "mybustimes.asgi:application", \
"--workers", "4", \
"--worker-class", "uvicorn.workers.UvicornWorker", \
"--bind", "0.0.0.0:8000", \
"--log-level", "info", \
"--preload", \
"--timeout", "30", \
"--graceful-timeout", "30", \
"--max-requests", "500", \
"--max-requests-jitter", "50", \
"--worker-tmp-dir", "/dev/shm"]