fix: use named volumes for indexer and processor databases#224
Merged
Conversation
Both compose stacks declared their database data on anonymous volumes (cockroach `- /cockroach/cockroach-data`, postgres `- /var/lib/postgresql/data`). Anonymous volumes are bound to a specific container, so a service rename or recreate (e.g. the recent db -> cockroachdb rename) orphans the old volume and starts with empty data — forcing a full re-ingest/resync. Switch both to named volumes (cockroach-data, postgres-data) so database data survives renames and recreations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both compose stacks store database data on anonymous volumes:
indexer/docker-compose.yml:cockroachdb→- /cockroach/cockroach-datadocker-compose.yml:db(postgres) →- /var/lib/postgresql/dataAnonymous volumes are bound to a specific container. A service rename or recreate (e.g. the recent
db→cockroachdbrename in #218) orphans the old volume and brings the service up with empty data, forcing a full re-ingest (archive) or resync (processor).Fix
Switch both databases to named volumes (
cockroach-data,postgres-data) declared at the top level, so data persists across renames/recreations.Validated with
docker compose config(both stacks render valid; volumes resolve toindexer_cockroach-data/<project>_postgres-data).🤖 Generated with Claude Code