Load Mapbox token from Vault in CI
Build and deploy Flutter Web / build (push) Successful in 6m45s

This commit is contained in:
Ruslan Bakiev
2026-06-24 02:15:45 +07:00
parent 0231b9fee7
commit c427801621
2 changed files with 19 additions and 3 deletions
+4 -2
View File
@@ -1,13 +1,15 @@
# syntax=docker/dockerfile:1.7
FROM ghcr.io/cirruslabs/flutter:stable AS build
WORKDIR /app
ARG MAPBOX_ACCESS_TOKEN=""
ARG MAPBOX_STYLE="mapbox/standard"
ARG TELEGRAM_BOT_USERNAME="carfteebot"
ARG BUILD_VERSION="local"
COPY pubspec.* ./
RUN flutter pub get
COPY . .
RUN rm -rf build/web && \
RUN --mount=type=secret,id=mapbox_access_token,required=true \
MAPBOX_ACCESS_TOKEN="$(cat /run/secrets/mapbox_access_token)" && \
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" \