mnemo_cards/mnemo_cards_web_v2/Dockerfile

28 lines
709 B
Docker
Raw Normal View History

2025-12-11 00:38:08 +00:00
# syntax=docker/dockerfile:1.7
# --- Build stage ------------------------------------------------------------
FROM ghcr.io/cirruslabs/flutter:3.27.4 AS build
WORKDIR /app
COPY pubspec.* ./
RUN flutter pub get
COPY . .
ENV API_BASE_URL=https://api.mnemo-cards.online
RUN flutter build web --release \
--dart-define=API_BASE_URL=${API_BASE_URL}
# --- Runtime stage ----------------------------------------------------------
FROM nginx:1.27-alpine AS runtime
WORKDIR /usr/share/nginx/html
COPY web.nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build/web/ ./
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1