/_up returns 401 when require_valid_user = true, so curl -f always
failed, Docker marked the container unhealthy, and Traefik refused to
route traffic to it (causing the 404 on couchdb.manohargupta.com).
Switch to CMD-SHELL so the shell can expand $COUCHDB_USER /
$COUCHDB_PASSWORD from the container's environment at runtime.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The CouchDB 3.3 entrypoint runs as root and executes:
find /opt/couchdb \! -user couchdb -exec chown couchdb {} +
before writing a single log line. The :ro bind-mounted local.ini is
owned by root on the host, so chown fails with EROFS — set -e exits
immediately with code 1 and zero output (381ms crash, empty logs).
Running as user 5984:5984 skips the root block in the entrypoint
entirely, going straight to admin setup and CouchDB launch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mem_limit: 768m causes the kernel cgroup OOM killer to fire before
the Erlang VM writes its first log line on a swap-heavy host — manifests
as exit code 1 / empty docker logs / OOMKilled:false (kernel kill, not
Docker's own cgroup reporter). Removing the limit lets CouchDB start.
Also adds enable_cors = true to [httpd] — required in CouchDB 3.x for
the [cors] section to take effect (without it CORS headers are silently
dropped).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>