fix prod : Eau2018.xls dans l'image Docker + build context racine
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

- backend.Dockerfile : COPY Eau2018.xls /app/ (contexte = racine projet)
- docker-compose.yml : section build: pour backend et frontend (context: ..)
- seed.py : XLS_PATH cherche d'abord /app/Eau2018.xls, fallback ../

Sans ça python seed.py échoue dans le conteneur (fichier absent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-03-24 04:15:06 +01:00
parent 90b069cb88
commit 8341a050d3
3 changed files with 12 additions and 1 deletions

View File

@@ -17,7 +17,9 @@ from app.services.auth_service import hash_password
from app.services.import_service import generate_auth_code
from app.engine.pricing import HouseholdData, compute_p0
XLS_PATH = os.path.join(os.path.dirname(__file__), "..", "Eau2018.xls")
XLS_PATH = os.path.join(os.path.dirname(__file__), "Eau2018.xls")
if not os.path.exists(XLS_PATH):
XLS_PATH = os.path.join(os.path.dirname(__file__), "..", "Eau2018.xls")
# Codes fixes — identiques dans le dev hint frontend

View File

@@ -11,6 +11,7 @@ COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ .
COPY Eau2018.xls /app/Eau2018.xls
# Production
FROM base AS production

View File

@@ -2,6 +2,10 @@ name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}
services:
backend:
build:
context: ..
dockerfile: docker/backend.Dockerfile
target: production
image: sejeteralo-backend:latest
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-backend
restart: always
@@ -20,6 +24,10 @@ services:
- sonic
frontend:
build:
context: ..
dockerfile: docker/frontend.Dockerfile
target: production
image: sejeteralo-frontend:latest
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-frontend
restart: always