Include feature-flags.dev.json in backend Docker build context#9178
Conversation
The .dockerignore allow-list excluded feature-flags.dev.json, so COPY . /app never copied it into the image. With FEATURE_FLAGS_FILE_OVERRIDE_PATH pointing at it in backend.dev.env, the backend crashed on startup with FileNotFoundError. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MobileInstall the Dev Tool (iOS via TestFlight, iOS Simulator, or Android .apk) here. Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.
Deep linksiOS Android Web (Vercel)View the Vercel web preview for this branch. Backend
Other
|
📝 Release NotesThis PR does not need to be included in release notes. Reason: This fixes a developer/docker build configuration issue that caused the backend to fail only in a local containerized development setup. It is not a user-facing change, and it is not major technical infrastructure work that end users would notice in production. 🤖 Bot Debug InformationModel: |


The backend
.dockerignoreignores everything and only allow-lists specific paths.feature-flags.dev.json(added in 892f073, "Switch to growthbook feature flags") was not in the allow-list, soCOPY . /appin the Dockerfile silently excluded it from the build context. Becausebackend.dev.envsetsFEATURE_FLAGS_FILE_OVERRIDE_PATH=feature-flags.dev.json, the backend crashed on startup withFileNotFoundError: .../feature-flags.dev.json— and rebuilding withdocker compose up --builddidn't help, since the file was never in the build context to begin with.This adds
!feature-flags.dev.jsonto the allow-list so it gets copied into the image.Testing
docker compose up --buildand confirm the backend starts without theFileNotFoundErrorfromsetup_experimentation().Backend checklist
developif necessary for linear migration historyFor maintainers
This PR was created with the Couchers PR skill.