21 lines
No EOL
485 B
Python
21 lines
No EOL
485 B
Python
"""
|
|
Point d'entree WSGI pour Gunicorn.
|
|
Remplace le serveur de developpement Flask par Gunicorn en production.
|
|
Usage: gunicorn --workers 3 --timeout 120 --bind 0.0.0.0:5080 wsgi:app
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
# Ajouter /app au PYTHONPATH
|
|
sys.path.insert(0, '/app')
|
|
|
|
# Charger les variables d'environnement
|
|
from dotenv import load_dotenv
|
|
load_dotenv('/app/.env.docker')
|
|
|
|
from app_new import create_app
|
|
|
|
app = create_app()
|
|
|
|
if __name__ == '__main__':
|
|
app.run(host='0.0.0.0', port=5080) |