use gunicorn for prod api
This commit is contained in:
parent
3dda493315
commit
73eee65323
@ -1,10 +1,10 @@
|
|||||||
FROM python:3.9.20-slim-bookworm
|
FROM python:3.9.20-slim-bookworm
|
||||||
|
|
||||||
RUN pip install python-dotenv flask
|
RUN pip install python-dotenv flask gunicorn
|
||||||
RUN apt-get update && apt-get install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY api.py tx.sh .
|
COPY api.py tx.sh .
|
||||||
RUN chmod +x tx.sh api.py
|
RUN chmod +x tx.sh api.py
|
||||||
|
|
||||||
CMD ./api.py
|
CMD gunicorn --workers 4 --bind 0.0.0.0:5000 api:app
|
||||||
|
BIN
__pycache__/api.cpython-312.pyc
Normal file
BIN
__pycache__/api.cpython-312.pyc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user