diff --git a/luckychit/Dockerfile b/luckychit/Dockerfile index c8156ac..87b0af8 100644 --- a/luckychit/Dockerfile +++ b/luckychit/Dockerfile @@ -1,17 +1,15 @@ # Frontend Dockerfile for Chitfund (Flutter Web) -FROM node:20-slim - +FROM ghcr.io/cirruslabs/flutter:3.24.0 AS build WORKDIR /app - -# We serve the build/web directory. -# NOTE: This Dockerfile assumes you have already run 'flutter build web' -# or we will use a multi-stage build if you prefer. -# For simplicity in this home lab, we copy the build output. - -COPY package*.json ./ -RUN npm install express - COPY . . +RUN flutter pub get +RUN flutter build web --release + +FROM node:20-slim +WORKDIR /app +RUN npm init -y && npm install express +COPY --from=build /app/build/web ./build/web +COPY web-server.js . EXPOSE 8080