Skip to content

chore(infra)!: replace CouchDB with DocumentDB in docker-compose#205

Draft
ogruene wants to merge 1 commit into
mainfrom
chore/migrate-to-documentdb
Draft

chore(infra)!: replace CouchDB with DocumentDB in docker-compose#205
ogruene wants to merge 1 commit into
mainfrom
chore/migrate-to-documentdb

Conversation

@ogruene

@ogruene ogruene commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Replace CouchDB with DocumentDB

Migrates the local development database from CouchDB to DocumentDB Local, a MongoDB-compatible document database built on PostgreSQL.

What changed

  • docker-compose.yml: replaced couchdb image with ghcr.io/documentdb/documentdb/documentdb-local:latest on port 10260, updated server environment to use DATABASE_TYPE=MongoDB, new credentials, and DATABASE_SKIP_VERIFY=true for the auto-generated TLS certificate
  • Renamed volume couchdb_datadocumentdb_data

Why pg_isready instead of mongosh for the healthcheck

DocumentDB Local runs a MongoDB-compatible gateway (port 10260) on top of PostgreSQL (port 9712). The obvious healthcheck would use mongosh to ping the gateway — but this causes significant log pollution:

  • The gateway enforces TLS using a self-signed auto-generated certificate, so mongosh requires ?tls=true&tlsAllowInvalidCertificates=true
  • Every mongosh connection unconditionally issues atlasVersion and getParameter startup probes that DocumentDB does not implement, logging server-side errors on every healthcheck interval — not suppressible

pg_isready checks the underlying PostgreSQL socket directly, generates zero log entries, and is already present in the container image. The trade-off is that it does not verify the gateway layer. For local development this is acceptable since the gateway rarely fails independently of PostgreSQL.

⚠️ BREAKING CHANGE: Data from former docker-compose runs will not be available any longer.

This commit updates the docker-compose configuration to switch from CouchDB to DocumentDB.

BREAKING CHANGE: Data from former docker-compose runs will not be available any longer.
Assisted-by: GitHub Copilot
@ogruene ogruene force-pushed the chore/migrate-to-documentdb branch from 861ca6b to e4406f0 Compare June 10, 2026 05:17
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.

1 participant