Skip to content

chore: update compose stacks and shared networking#218

Open
sameh-farouk wants to merge 1 commit intomaster-add-db-indexesfrom
master-update-compose-stacks
Open

chore: update compose stacks and shared networking#218
sameh-farouk wants to merge 1 commit intomaster-add-db-indexesfrom
master-update-compose-stacks

Conversation

@sameh-farouk
Copy link
Copy Markdown
Member

Summary

Updates both Docker Compose stacks with version bumps and a shared network for seamless inter-stack communication.

Version upgrades

  • PostgreSQL 16 -> 17
  • CockroachDB v22.2.2 -> v22.2.15
  • substrate-gateway 2.5.0 -> 2.7.0

Shared networking

  • Both compose files now use a shared external Docker network (tfgrid_bknd)
  • Processor reaches the indexer gateway by service name (http://gateway:8000/graphql) instead of requiring host bridge IP workarounds
  • INDEXER_ENDPOINT_URL default updated in .env

DNS collision fix

  • Renamed indexer CockroachDB service from db to cockroachdb to avoid DNS collision with the processor's PostgreSQL db service on the shared network
  • Updated setup_db.sh host reference accordingly

Cleanup

  • Removed obsolete version field from both compose files

Docs

  • Updated docs/production.md with shared network setup step and env var changes

Setup

Before starting either stack, create the shared network:

docker network create tfgrid_bknd

Test plan

  • Start indexer stack, verify all services healthy
  • Start processor stack, verify it connects to gateway by service name
  • Verify processor syncs without INDEXER_ENDPOINT_URL workarounds

@sameh-farouk sameh-farouk linked an issue Apr 4, 2026 that may be closed by this pull request
@sameh-farouk sameh-farouk force-pushed the master-add-db-indexes branch from e92e002 to 2a3a713 Compare April 5, 2026 00:03
@sameh-farouk sameh-farouk force-pushed the master-update-compose-stacks branch 2 times, most recently from 7ffbc98 to c6e9293 Compare April 5, 2026 00:34
@sameh-farouk sameh-farouk force-pushed the master-add-db-indexes branch from 2a3a713 to d93b222 Compare April 5, 2026 00:53
@sameh-farouk sameh-farouk force-pushed the master-update-compose-stacks branch 2 times, most recently from a8363a8 to 3ae18d2 Compare April 6, 2026 10:00
- Upgrade PostgreSQL 16 -> 17
- Upgrade CockroachDB v22.2.2 -> v22.2.15
- Upgrade substrate-gateway 2.5.0 -> 2.7.0
- Rename indexer CockroachDB service from 'db' to 'cockroachdb' to
  avoid DNS collision when both stacks share a Docker network
- Add shared external network 'tfgrid_bknd' to both compose files so
  the processor can reach the indexer gateway by service name
- Update INDEXER_ENDPOINT_URL default to http://gateway:8000/graphql
  (Docker service name) instead of localhost:8888 (host port mapping)
- Bind database ports to localhost only (PostgreSQL 5432, CockroachDB
  26257, CockroachDB admin 8080) to prevent unauthorized access
- Remove obsolete 'version' field from both compose files
- Update production docs with shared network setup and env var changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sameh-farouk sameh-farouk force-pushed the master-add-db-indexes branch from d93b222 to 1e96cca Compare April 6, 2026 14:43
@sameh-farouk sameh-farouk force-pushed the master-update-compose-stacks branch from 3ae18d2 to be49aed Compare April 6, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated Docker Compose stacks and missing shared networking

1 participant