Merge pull request #89 from R0m1k3/antigravity

build: Optimize Dockerfile by adding DART VM memory option and removi…
This commit is contained in:
LogiFlow authored and GitHub committed 2025-12-08 12:47:15 +01:00
commit 15e303fb74
1 file changed
+3 -7
+3 -7
View File
@@ -10,8 +10,8 @@ WORKDIR /app
# Safe directory configuration for git
RUN git config --global --add safe.directory /app
# Diagnostic: Show Flutter version
RUN flutter --version
# Optimize DART VM Memory for build to prevent OOM
ENV DART_VM_OPTIONS="--old_gen_heap_size=2048"
# Enable web support (idempotent)
RUN flutter config --enable-web
@@ -29,13 +29,9 @@ COPY . .
# Re-run pub get after copying source to ensure lockfile consistency
RUN flutter pub get
# Diagnostic: Analyze for errors before building
# Using || true to prevent build failure on warnings, as we want to see the error in build step if any
RUN flutter analyze --no-fatal-warnings || true
# Build web application (CanvasKit renderer is now default)
# Added --no-tree-shake-icons to prevent potential font issues in some environments
RUN flutter build web --release --base-href="/" --no-tree-shake-icons --verbose
RUN flutter build web --release --base-href="/" --no-tree-shake-icons
# ============================================
# Stage 2: Serve with custom Dart server (with API proxy)