Set default portal port to 8081, fix Dart build issue in cart screen, and update setup documentation. Co-Authored-By: Oz <oz-agent@warp.dev>
24 lines
806 B
Docker
24 lines
806 B
Docker
FROM ghcr.io/cirruslabs/flutter:stable AS build
|
|
|
|
WORKDIR /workspace/app
|
|
RUN flutter config --enable-web
|
|
RUN flutter create --platforms=web --project-name flutter_ecommerce_portal --org com.example.portal /workspace/app
|
|
|
|
COPY pubspec.yaml /workspace/app/pubspec.yaml
|
|
RUN flutter pub get
|
|
|
|
COPY lib /workspace/app/lib
|
|
COPY assets /workspace/app/assets
|
|
RUN flutter build web --release
|
|
|
|
FROM nginx:1.27-alpine AS runtime
|
|
|
|
COPY --from=build /workspace/app/build/web /usr/share/nginx/html
|
|
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
|
COPY docker/entrypoint/30-generate-runtime-config.sh /docker-entrypoint.d/30-generate-runtime-config.sh
|
|
COPY assets/config/runtime_config.template.json /opt/runtime_config.template.json
|
|
|
|
RUN chmod +x /docker-entrypoint.d/30-generate-runtime-config.sh
|
|
|
|
EXPOSE 80
|