File size: 321 Bytes
200637e
 
 
 
 
761b8e7
200637e
761b8e7
 
200637e
 
 
761b8e7
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM python:3.9-slim

WORKDIR /app
COPY . /app

ENV PYTHONUNBUFFERED=1

# install dependencies (ensure requirements.txt contains gunicorn)
RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 7860

# Use shell form to allow ${PORT:-7860} expansion
CMD ["sh", "-c", "gunicorn -w 1 -b 0.0.0.0:${PORT:-7860} app:app"]