feat: update API base URL handling and improve Caddy configuration for Flutter app
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user