DeutschLernen/german-app-frontend/Dockerfile
Lasse Rune Hansen db87e09333 fix(infra): correct Dockerfile paths relative to build context
- Fix backend Dockerfile: COPY paths relative to GermanApp/ context
- Fix frontend Dockerfile: paths relative to german-app-frontend/ context

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 12:35:33 +02:00

44 lines
1 KiB
Docker

# GermanApp Frontend Dockerfile
# React 19 + TypeScript + Vite Application
# Multi-stage build for production optimization
# Build context: german-app-frontend directory
# ============================================
# Build Stage
# ============================================
FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source files
COPY . .
# Build the application
RUN npm run build
# ============================================
# Runtime Stage
# ============================================
FROM nginx:alpine AS runtime
WORKDIR /usr/share/nginx/html
# Copy built files from build stage
COPY --from=build /app/dist .
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
# Entry point (nginx runs by default)
CMD ["nginx", "-g", "daemon off;"]