Skip to content

Include feature-flags.dev.json in backend Docker build context#9178

Merged
aapeliv merged 1 commit into
developfrom
devops/bugfix/dockerignore-feature-flags
Jun 25, 2026
Merged

Include feature-flags.dev.json in backend Docker build context#9178
aapeliv merged 1 commit into
developfrom
devops/bugfix/dockerignore-feature-flags

Conversation

@aapeliv

@aapeliv aapeliv commented Jun 25, 2026

Copy link
Copy Markdown
Member

The backend .dockerignore ignores 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, so COPY . /app in the Dockerfile silently excluded it from the build context. Because backend.dev.env sets FEATURE_FLAGS_FILE_OVERRIDE_PATH=feature-flags.dev.json, the backend crashed on startup with FileNotFoundError: .../feature-flags.dev.json — and rebuilding with docker compose up --build didn't help, since the file was never in the build context to begin with.

This adds !feature-flags.dev.json to the allow-list so it gets copied into the image.

Testing

  • docker compose up --build and confirm the backend starts without the FileNotFoundError from setup_experimentation().

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

This PR was created with the Couchers PR skill.

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>
@CouchersBot

CouchersBot commented Jun 25, 2026

Copy link
Copy Markdown
Member

Mobile

Install 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.

    iOS         Android    
    QR to open the iOS build         QR to open the Android build    
    Open in Dev Tool         Open in Dev Tool    
Deep links

iOS

couchers-devtool://expo-development-client/?url=https%3A%2F%2Fc089d97a--ota.preview.couchershq.org%2Fios%2Fmanifest

Android

couchers-devtool://expo-development-client/?url=https%3A%2F%2Fc089d97a--ota.preview.couchershq.org%2Fandroid%2Fmanifest

Web (Vercel)

View the Vercel web preview for this branch.

Backend

Schema Schema diff Sample emails

Other

Protos Backend coverage Web coverage

@nabramow nabramow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aapeliv
aapeliv merged commit 662c9f1 into develop Jun 25, 2026
8 checks passed
@aapeliv
aapeliv deleted the devops/bugfix/dockerignore-feature-flags branch June 25, 2026 12:43
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This 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 Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants