Use a proper WSGI server

This commit is contained in:
ovosimpatico
2024-08-26 14:09:23 -03:00
parent a7e6c1ee58
commit ca666931be
4 changed files with 5 additions and 4 deletions

View File

@@ -16,5 +16,5 @@ EXPOSE 5000
# Define environment variable
ENV FLASK_APP=run.py
# Run the application
CMD ["flask", "run", "--host=0.0.0.0"]
# Run the application using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "run:app"]

View File

@@ -11,7 +11,6 @@
<p align="center">
<a href="#about">About</a> •
<a href="#features">Features</a> •
<a href="#prerequisites">Prerequisites</a> •
<a href="#installation">Installation</a> •
<a href="#usage">Usage</a> •

View File

@@ -6,4 +6,5 @@ services:
- "5000:5000"
environment:
- FLASK_ENV=production
- GUNICORN_CMD_ARGS="--workers=3"
restart: unless-stopped

View File

@@ -1,2 +1,3 @@
flask
requests
gunicorn