fix prod : Eau2018.xls dans l'image Docker + build context racine
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
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:
@@ -17,7 +17,9 @@ from app.services.auth_service import hash_password
|
|||||||
from app.services.import_service import generate_auth_code
|
from app.services.import_service import generate_auth_code
|
||||||
from app.engine.pricing import HouseholdData, compute_p0
|
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
|
# Codes fixes — identiques dans le dev hint frontend
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ COPY backend/requirements.txt .
|
|||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY backend/ .
|
COPY backend/ .
|
||||||
|
COPY Eau2018.xls /app/Eau2018.xls
|
||||||
|
|
||||||
# Production
|
# Production
|
||||||
FROM base AS production
|
FROM base AS production
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: docker/backend.Dockerfile
|
||||||
|
target: production
|
||||||
image: sejeteralo-backend:latest
|
image: sejeteralo-backend:latest
|
||||||
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-backend
|
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-backend
|
||||||
restart: always
|
restart: always
|
||||||
@@ -20,6 +24,10 @@ services:
|
|||||||
- sonic
|
- sonic
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: docker/frontend.Dockerfile
|
||||||
|
target: production
|
||||||
image: sejeteralo-frontend:latest
|
image: sejeteralo-frontend:latest
|
||||||
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-frontend
|
container_name: ${COMPOSE_PROJECT_NAME:-syoul-sejeteralo-main}-frontend
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
Reference in New Issue
Block a user