feat: update API base URL handling and improve Caddy configuration for Flutter app

This commit is contained in:
Nils-Johan Gynther
2026-04-21 21:59:47 +02:00
parent ac5891394e
commit 39384a0e74
4 changed files with 19 additions and 10 deletions
+4 -3
View File
@@ -8,10 +8,11 @@ RUN flutter pub get
COPY . .
# Inject the internal API URL at build time via --dart-define
ARG FLUTTER_API_URL_INTERNAL=http://recipe-api:8080
# Inject API base URL at build time via --dart-define.
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.
ARG API_BASE_URL=/api
RUN flutter build web --release \
--dart-define=API_BASE_URL=${FLUTTER_API_URL_INTERNAL}
--dart-define=API_BASE_URL=${API_BASE_URL}
# Stage 2 Serve with Caddy
FROM caddy:alpine AS runner