mnemo_cards/mnemo_cards_web_v2/Dockerfile
Dmitry 3ca3f8032c
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Web App CI / test (push) Waiting to run
Web App CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
voices
2025-12-11 03:51:18 +03:00

44 lines
1.4 KiB
Docker

# syntax=docker/dockerfile:1.7
# --- Build stage ------------------------------------------------------------
# Note: This Dockerfile should be built from the parent directory:
# docker build -f mnemo_cards_web_v2/Dockerfile -t mnemo_cards_web .
FROM ghcr.io/cirruslabs/flutter:3.27.4 AS build
WORKDIR /app
# Copy all local dependencies
COPY mnemo_cards_common /app/mnemo_cards_common
COPY mnemo_cards_frontend_common /app/mnemo_cards_frontend_common
COPY chat/mnemo_cards_chat /app/chat/mnemo_cards_chat
COPY games/packages/bridge_core /app/games/packages/bridge_core
COPY games/packages/payloads_shared /app/games/packages/payloads_shared
COPY games/packages/game_tests /app/games/packages/game_tests
# Copy web app sources
COPY mnemo_cards_web_v2 /app/mnemo_cards_web_v2
WORKDIR /app/mnemo_cards_web_v2
# Get dependencies
RUN flutter pub get
# Build arg for API URL
ARG API_BASE_URL=https://api.mnemo-cards.online
# Build web app
RUN flutter build web --release \
--dart-define=API_BASE_URL=${API_BASE_URL}
# --- Runtime stage ----------------------------------------------------------
# FROM nginx:1.27-alpine AS runtime
# Copy nginx config
# COPY mnemo_cards_web_v2/nginx.conf /etc/nginx/conf.d/default.conf
# Copy built web app
# COPY --from=build /app/mnemo_cards_web_v2/build/web/ /usr/share/nginx/html/
EXPOSE 80
# HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
# CMD wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1