chore: streamline compose migrations#68
Conversation
WalkthroughThe pull request introduces a one-shot Docker-based migration service into the local development setup. A new 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@compose.yml`:
- Line 27: The docker image reference uses a default of "latest" (image:
ghcr.io/formbricks/hub:${HUB_IMAGE_TAG:-latest}), which makes migrations
non-deterministic; update the compose service image line to require or default
to a pinned release tag or immutable digest instead — replace the "latest"
fallback for HUB_IMAGE_TAG with a concrete tag (or a digest) and document that
HUB_IMAGE_TAG must be set, ensuring the image declaration in compose.yml (the
image: ghcr.io/formbricks/hub:${HUB_IMAGE_TAG:-...} entry) uses that pinned
value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 57979ecc-00da-458c-a4b2-359e9f1ce593
📒 Files selected for processing (4)
.env.exampleREADME.mdcompose.ymltests/README.md
What does this PR do?
Fixes:
compose.ymlfor seamless quickstart setupThis PR improves the local Docker Compose setup so the default path is quieter and easier to use:
hub-migrateservice that waits for Postgres, then runs Hub goose migrations and River queue migrations.gooseandriver, while bind-mounting this checkout’smigrations/directory so local development stays aligned with the current branch.hub-migrateto complete successfully before starting.The public quickstart docs live outside this repo and should use the same one-shot migration pattern with the published image’s bundled
/app/migrations.How should this be tested?
docker compose --env-file /dev/null confighub-migrateis presenthub-migratebind-mounts./migrations:/app/migrations:rohub-migratecompletiongoose -dir migrations validatego test ./cmd/api ./cmd/worker ./internal/config ./internal/workersNote: an isolated full Docker smoke test was attempted, but this machine already had a fixed-name
formbricks_postgrescontainer, which conflicts with this repo’s existingcontainer_nameconvention.Checklist
Required
make buildmake tests(integration tests intests/)make fmtandmake lint; no new warningsgit pull origin mainmigrations/with goose annotations and ranmake migrate-validateAppreciated
make testsor API contract workflow)docs/if changes were necessarymake tests-coveragefor meaningful logic changes