38089ef2699cc2504b98feca915b643709a2012e
coolcouch
CouchDB 3 on Coolify, with CORS enabled and system databases bootstrapped at first start.
Deploy
- In Coolify: New Resource → Docker Compose and point it at this repository.
- In the resource's Environment Variables tab, set:
COUCHDB_PASSWORD— requiredCOUCHDB_USER— optional, defaults toadmin
- In the resource's Domains tab, assign a domain to the
couchdbservice on port5984. Coolify fillsSERVICE_FQDN_COUCHDB_5984from this. - Deploy. The
couchdb-initone-shot service will wait for CouchDB to be healthy, thenPUT_users,_replicator,_global_changesand exit.
Verify
Replace $DOMAIN and $PASS:
curl -fsS https://$DOMAIN/_up
curl -fsS -u admin:$PASS https://$DOMAIN/
curl -fsS -u admin:$PASS https://$DOMAIN/_all_dbs
curl -fsS -I -X OPTIONS https://$DOMAIN/ \
-H "Origin: https://example.com" \
-H "Access-Control-Request-Method: GET"
Expected: _up returns {"status":"ok",...}; / returns the CouchDB welcome JSON; _all_dbs returns ["_global_changes","_replicator","_users"]; the preflight returns a 2xx with an Access-Control-Allow-Origin header.
CORS
Wildcard origin (*), credentials = false — the only browser-spec-legal combination with a wildcard. If a client needs cookie/credentialed auth, switch origins in couchdb/local.d/cors.ini to an explicit list and set credentials = true.
Files
docker-compose.yml— services, volume, Traefik labels, healthcheck, init sidecarcouchdb/local.d/cors.ini— mounted into/opt/couchdb/etc/local.d/so CouchDB picks it up at startup
Description
Languages
Gleam
94%
Dockerfile
6%