chore: remove embedded Postgres, Redis, secrets from Docker image#1264
Conversation
As of v5, Sourcebot no longer ships an embedded Postgres or Redis. External instances are now required via DATABASE_URL and REDIS_URL. - Dockerfile: drop postgresql16/redis packages, DATABASE_DATA_DIR/ REDIS_DATA_DIR env, postgres/redis users, and /run/postgresql setup - entrypoint.sh: hard-fail with guidance when DATABASE_URL/REDIS_URL are unset; remove embedded init/startup blocks - supervisord.conf: remove the redis program - docs: mark DATABASE_URL/REDIS_URL required, drop data-dir vars, document the breaking change and data migration in the v4-to-v5 guide - CHANGELOG: note the breaking change Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…TION_KEY - entrypoint.sh: require AUTH_SECRET and SOURCEBOT_ENCRYPTION_KEY explicitly (no auto-generation, no plaintext file loading); hard-fail with migration guidance and warn if the legacy plaintext files linger - v4-to-v5 guide: document the secrets, role-management, and external Postgres/Redis breaking changes with per-item migration steps - environment-variables: mark both secrets required - roles-and-permissions: add default-role-by-plan table - CHANGELOG: update breaking-change entries Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Fixes SOU-1269
Summary
As part of the v5 release, this removes the Postgres and Redis that were bundled inside the shipped Docker image. External Postgres and Redis are now required and must be provided via
DATABASE_URLandREDIS_URL. The image now contains only the app (web + backend + zoekt).Compose and Helm deployments already run their own Postgres/Redis, so they are unaffected. Only deployments that relied on the embedded services (typically a bare
docker runwithoutDATABASE_URL/REDIS_URL) need to migrate.Changes
Dockerfile: droppostgresql16,postgresql16-contrib, andredispackages; removeDATABASE_DATA_DIR/REDIS_DATA_DIRenv vars; remove thepostgres/redisusers and the/run/postgresqlsetup.entrypoint.sh: whenDATABASE_URLorREDIS_URLis unset, hard-fail with a clear error pointing at the migration guide instead of falling back to embedded mode; remove theinitdb, data-dir init, and embedded-postgres startup blocks.supervisord.conf: remove theredisprogram (zoekt/web/backend remain).environment-variables.mdx: markDATABASE_URL/REDIS_URLas required; remove theDATABASE_DATA_DIR/REDIS_DATA_DIRrows.v4-to-v5-guide.mdx: document the breaking change, who's affected, and step-by-steppg_dump/pg_restoredata migration.CHANGELOG.md: breaking-change entry under[Unreleased] → Changed.Notes
packages/shared/db.ts,web/prisma.ts,backend/redis.ts) is untouched — it never branched on embedded mode.docker-compose.ymlneeds no change; it already runs external Postgres (:16, matching the previously-bundled version) and Redis with the URLs injected.🤖 Generated with Claude Code