Skip to content

Commit 2261dd8

Browse files
sameh-faroukclaude
andcommitted
fix: use named volumes for indexer and processor databases
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>
1 parent 6e9497e commit 2261dd8

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
ports:
1111
- "127.0.0.1:${DB_PORT}:5432"
1212
volumes:
13-
- /var/lib/postgresql/data
13+
- postgres-data:/var/lib/postgresql/data
1414
environment:
1515
POSTGRES_USER: ${DB_USER}
1616
POSTGRES_PASSWORD: ${DB_PASS}
@@ -48,3 +48,6 @@ services:
4848
- 4000:4000
4949
depends_on:
5050
- db
51+
52+
volumes:
53+
postgres-data:

indexer/docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
- "127.0.0.1:8080:8080"
1313
command: start-single-node --insecure
1414
volumes:
15-
- /cockroach/cockroach-data
15+
- cockroach-data:/cockroach/cockroach-data
1616

1717
cockroachdb-init:
1818
depends_on:
@@ -75,3 +75,6 @@ services:
7575
DB_USER: "root"
7676
ports:
7777
- "4444:3000"
78+
79+
volumes:
80+
cockroach-data:

0 commit comments

Comments
 (0)