mod dockerfile

This commit is contained in:
2026-01-26 20:11:32 +01:00
parent 8e612037d0
commit f730dabca2
2 changed files with 6 additions and 5 deletions

View File

@@ -18,10 +18,11 @@ RUN apt-get update && apt-get install -y \
# Install Flutter # Install Flutter
ENV FLUTTER_HOME=/usr/local/flutter ENV FLUTTER_HOME=/usr/local/flutter
ENV PATH="${FLUTTER_HOME}/bin:${PATH}" ENV PATH="${FLUTTER_HOME}/bin:${PATH}"
ENV TAR_OPTIONS=--no-same-owner
RUN git clone https://github.com/flutter/flutter.git ${FLUTTER_HOME} -b stable --depth 1 && \ RUN git clone https://github.com/flutter/flutter.git ${FLUTTER_HOME} -b stable --depth 1 && \
flutter config --enable-web --no-analytics && \ flutter config --enable-web --no-analytics && \
flutter doctor -v flutter precache --web
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app
@@ -34,8 +35,8 @@ RUN flutter pub get
COPY . . COPY . .
# Build web app (downloads web artifacts on-demand without gradle) # Build web app (web-only artifacts; suppress wasm dry-run warnings)
RUN flutter build web --release --web-renderer canvaskit RUN flutter build web --release --no-wasm-dry-run
# Production stage - Nginx # Production stage - Nginx
FROM nginx:alpine FROM nginx:alpine

View File

@@ -6,8 +6,8 @@ WORKDIR /app
# Copy package files # Copy package files
COPY package*.json ./ COPY package*.json ./
# Install dependencies (only production for smaller image) # Install dependencies (omit dev; no lockfile required)
RUN npm ci --only=production RUN npm install --omit=dev
# Copy application code # Copy application code
COPY server.js ./ COPY server.js ./