feat: add Flutter web frontend with authentication and recipe management features
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Stage 1 – Build Flutter web
|
||||
FROM ghcr.io/cirruslabs/flutter:stable AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pubspec.yaml pubspec.lock* ./
|
||||
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
|
||||
RUN flutter build web --release \
|
||||
--dart-define=API_BASE_URL=${FLUTTER_API_URL_INTERNAL}
|
||||
|
||||
# Stage 2 – Serve with Caddy
|
||||
FROM caddy:alpine AS runner
|
||||
|
||||
ARG PORT=5000
|
||||
ENV PORT=${PORT}
|
||||
|
||||
COPY --from=builder /app/build/web /usr/share/caddy
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
|
||||
EXPOSE ${PORT}
|
||||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
||||
Reference in New Issue
Block a user