Files
Quote-Generator-Client/Dockerfile
ImBenji f1ce1c77a4
Some checks failed
Build Android App / build (push) Has been cancelled
add ad services and Docker configuration for web app
2026-01-02 15:21:27 +00:00

29 lines
583 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 --web-renderer html
# 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;"]