Skip to content

fix(api): include gradle.properties in docker build and configure 2GB heap - #17

Merged
qyinm merged 1 commit into
mainfrom
fix/fly-docker-gradle-memory
Aug 20, 2026
Merged

fix(api): include gradle.properties in docker build and configure 2GB heap#17
qyinm merged 1 commit into
mainfrom
fix/fly-docker-gradle-memory

Conversation

@qyinm

Copy link
Copy Markdown
Contributor

Summary

Fixes Fly.io Docker image build failure caused by Kotlin compiler OutOfMemoryError: GC overhead limit exceeded.

Why

When building the API Docker image on Fly.io remote builders:

  1. apps/api/.dockerignore excluded gradle.properties (due to wildcard exclusion).
  2. Dockerfile did not copy gradle.properties into /workspace.
  3. Consequently, Gradle and Kotlin daemon ran with default low memory inside the container, crashing with OutOfMemoryError: GC overhead limit exceeded during compileKotlin.

Changes

  • Whitelisted !gradle.properties in apps/api/.dockerignore.
  • Added gradle.properties to COPY directive and set GRADLE_OPTS="-Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvmargs=-Xmx2g" in apps/api/Dockerfile.
  • Verified successful production build and machine rollout (v53) on Fly.io.

@vercel

vercelBot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
plot-webReadyReadyPreviewAug 20, 2026 1:47am

@qyinm
qyinm merged commit a0dd4f8 into mainAug 20, 2026
4 checks passed
@qyinm
qyinm deleted the fix/fly-docker-gradle-memory branch August 20, 2026 12:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@qyinm