Add web service worker loader
Build and deploy Flutter Web / build (push) Failing after 4m19s

This commit is contained in:
Ruslan Bakiev
2026-06-21 09:34:40 +07:00
parent c374797484
commit fca8004e8d
6 changed files with 185 additions and 4 deletions
+10 -2
View File
@@ -3,13 +3,21 @@ WORKDIR /app
ARG MAPBOX_ACCESS_TOKEN=""
ARG MAPBOX_STYLE="mapbox/streets-v12"
ARG TELEGRAM_BOT_USERNAME="carfteebot"
ARG BUILD_VERSION="local"
COPY pubspec.* ./
RUN flutter pub get
COPY . .
RUN flutter build web --release \
RUN rm -rf build/web && \
flutter build web --release --base-href=/ -o build/web \
--dart-define=MAPBOX_ACCESS_TOKEN="$MAPBOX_ACCESS_TOKEN" \
--dart-define=MAPBOX_STYLE="$MAPBOX_STYLE" \
--dart-define=TELEGRAM_BOT_USERNAME="$TELEGRAM_BOT_USERNAME"
--dart-define=TELEGRAM_BOT_USERNAME="$TELEGRAM_BOT_USERNAME" && \
cp web/index.prod.html build/web/index.html && \
rm -f build/web/index.prod.html && \
dart run sw:generate \
--input=build/web \
--prefix=mapflow \
--version="$BUILD_VERSION"
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf