diff --git a/CHANGELOG.md b/CHANGELOG.md index 904a13d3..dd828cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Fixed Calendar and Colibo feed configuration urls and added [] result when no locationEndpoint is set. +- Fixed baked-in `.env` shipping `APP_ENV=dev` in the API image; rewritten to `prod` at build time so + direct reads don't try to bootstrap a dev environment the prod-only dependencies can't satisfy. ## [3.0.0-rc2] - 2026-05-05 diff --git a/infrastructure/display-api-service/Dockerfile b/infrastructure/display-api-service/Dockerfile index de7dc6a1..66fc36bb 100644 --- a/infrastructure/display-api-service/Dockerfile +++ b/infrastructure/display-api-service/Dockerfile @@ -63,6 +63,12 @@ RUN APP_ENV=prod composer install --no-dev -o --classmap-authoritative --no-scri # rest of public/media/ — see the file for the preserved entries. COPY --chown=deploy:deploy --from=repository-root ./ ./ +# The committed .env defaults APP_ENV to dev for local development. The +# image only ships prod dependencies (composer install --no-dev), so any +# tooling that reads .env directly without our docker-entrypoint.sh +# would bootstrap a dev environment that can't resolve its services. +RUN sed -i 's/^APP_ENV=dev$/APP_ENV=prod/' .env + # Vite manifest must be in place before the second composer install # triggers cache:clear, otherwise the vite bundle can't generate its # cache config files.