Spaces:
Runtime error
Runtime error
wilenPxs Claude Fable 5 commited on
Commit ·
fda0382
1
Parent(s): d1dc8e5
Deploiement Render : port flexible (${PORT:-7860}) + blueprint render.yaml
Browse filesLe Dockerfile lit desormais le port impose par l hebergeur (Render -> 10000)
avec repli 7860 (HF Spaces, inchange). render.yaml permet un deploiement
Blueprint en un clic (plan free, healthcheck /health, cles en variables
d environnement non versionnees). Guide : DEPLOIEMENT_RENDER.md (repo local).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Dockerfile +3 -2
- render.yaml +17 -0
Dockerfile
CHANGED
|
@@ -30,5 +30,6 @@ EXPOSE 7860
|
|
| 30 |
|
| 31 |
# UN SEUL worker (job store en mémoire + threads d'arrière-plan partagés),
|
| 32 |
# plusieurs threads pour que le polling et un job tournent en parallèle.
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
| 30 |
|
| 31 |
# UN SEUL worker (job store en mémoire + threads d'arrière-plan partagés),
|
| 32 |
# plusieurs threads pour que le polling et un job tournent en parallèle.
|
| 33 |
+
# Port : ${PORT} si l'hébergeur l'impose (Render → 10000), sinon 7860 (HF,
|
| 34 |
+
# posé par le ENV ci-dessus). Forme shell pour l'expansion de variable.
|
| 35 |
+
CMD gunicorn -w 1 --threads 8 --timeout 120 -b 0.0.0.0:${PORT:-7860} run:app
|
render.yaml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Blueprint Render — « New + → Blueprint » pointé sur ce dépôt déploie tout.
|
| 2 |
+
# (Alternative : créer le Web Service à la main, cf. DEPLOIEMENT_RENDER.md.)
|
| 3 |
+
services:
|
| 4 |
+
- type: web
|
| 5 |
+
name: pythonise-exercice
|
| 6 |
+
runtime: docker
|
| 7 |
+
plan: free # « starter » (7 $/mois) = pas de mise en veille
|
| 8 |
+
healthCheckPath: /health
|
| 9 |
+
envVars:
|
| 10 |
+
- key: OPENROUTER_API_KEY
|
| 11 |
+
sync: false # à saisir dans le dashboard (jamais dans le repo)
|
| 12 |
+
- key: OPENAI_API_KEY
|
| 13 |
+
sync: false
|
| 14 |
+
- key: APP_PASSWORD
|
| 15 |
+
sync: false
|
| 16 |
+
- key: APP_USER
|
| 17 |
+
value: pyxi
|