Spaces:
Sleeping
Sleeping
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -7,13 +7,13 @@ sleep 2
|
|
| 7 |
|
| 8 |
# Lancer le worker Celery en arrière-plan
|
| 9 |
echo "Lancement du worker Celery..."
|
| 10 |
-
celery -A tasks.worker_celery:celery_app worker --loglevel=info &
|
| 11 |
|
| 12 |
# Lancer l'API FastAPI (le backend modèle) en arrière-plan
|
| 13 |
echo "Lancement de l'API FastAPI..."
|
| 14 |
-
uvicorn main:app --host 0.0.0.0 --port 8000 &
|
| 15 |
|
| 16 |
-
# ---
|
| 17 |
-
# On
|
| 18 |
echo "Lancement de l'application Flask sur le port 7860..."
|
| 19 |
-
python -m gunicorn --
|
|
|
|
| 7 |
|
| 8 |
# Lancer le worker Celery en arrière-plan
|
| 9 |
echo "Lancement du worker Celery..."
|
| 10 |
+
python -m celery -A tasks.worker_celery:celery_app worker --loglevel=info &
|
| 11 |
|
| 12 |
# Lancer l'API FastAPI (le backend modèle) en arrière-plan
|
| 13 |
echo "Lancement de l'API FastAPI..."
|
| 14 |
+
python -m uvicorn main:app --host 0.0.0.0 --port 8000 &
|
| 15 |
|
| 16 |
+
# --- LA CORRECTION DÉFINITIVE ---
|
| 17 |
+
# On dit à Gunicorn de se déplacer dans le dossier /app AVANT de chercher app:app
|
| 18 |
echo "Lancement de l'application Flask sur le port 7860..."
|
| 19 |
+
python -m gunicorn --chdir /app -w 1 --threads 8 --timeout 120 --bind 0.0.0.0:7860 app:app
|