Skip to content

Commit

Permalink
deployment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kayprogrammer committed Aug 22, 2024
1 parent 966ad28 commit 226f1f8
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN flutter pub get
RUN flutter pub upgrade

# Build the application (for web)
RUN flutter build web
RUN flutter build web --web-renderer html

# Use Nginx to serve the app
FROM nginx:alpine
Expand All @@ -22,32 +22,4 @@ COPY --from=build /app/build/web /usr/share/nginx/html

EXPOSE 3000

CMD ["nginx", "-g", "daemon off;"]







# #Stage 1 - Install dependencies and build the app in a build environment
# FROM debian:latest AS build-env
# # Install flutter dependencies
# RUN apt-get update
# RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 sed
# RUN apt-get clean# Clone the flutter repo
# RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter# Set flutter path
# ENV PATH="${PATH}:/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin"
# # Run flutter doctor
# RUN flutter doctor -v
# RUN flutter channel master
# RUN flutter upgrade
# # Copy files to container and build
# RUN mkdir /app/
# COPY . /app/
# WORKDIR /app/RUN flutter build web

# EXPOSE 3000
# # Stage 2 - Create the run-time image
# FROM nginx:1.21.1-alpine
# COPY --from=build-env /app/build/web /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 226f1f8

Please sign in to comment.