Files
Quote-Generator-Client/Dockerfile
ImBenji 49b18b5701
Some checks failed
Build Android App / build (push) Failing after 47s
configure Gradle memory settings for improved build performance
2026-01-02 16:25:11 +00:00

29 lines
563 B
Docker

# Stage 1: Build the Flutter web app
FROM ghcr.io/cirruslabs/flutter:stable AS build
WORKDIR /app
# Copy pubspec files and get dependencies
COPY pubspec.yaml pubspec.lock ./
RUN flutter pub get
# Copy the rest of the app
COPY . .
# Build web app
RUN flutter build web --release
# Stage 2: Serve with nginx
FROM nginx:alpine
# Copy the built web app from build stage
COPY --from=build /app/build/web /usr/share/nginx/html
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]