0e4b2f7d1a
Backs the Obsidian 'Second Brain' vault (private repo: git.hobbs.farm/jeremy/
second-brain) with self-hosted multi-device sync. LAN-only for now; no public
Traefik route yet.
- couchdb:3.4 pinned, Watchtower disabled, mem_limit 1g.
- Data on LOCAL disk (/var/lib/couchdb) -- CouchDB file locking breaks over
NFSv3, same class as guacamole-db and semaphore-db.
- local.ini mounted READ-WRITE, deliberately: CouchDB 3.x writes runtime config
back into the last-loaded ini, and with :ro it exits 1 and logs NOTHING --
a silent crash-loop that is very hard to diagnose.
- CORS allows app://obsidian.md and capacitor://localhost (LiveSync desktop +
mobile origins); a wildcard origin is not allowed alongside credentials.
- require_valid_user everywhere EXCEPT /_up, so the blackbox probe can health
check it without credentials. Anonymous callers get 401 on all data.
- Admin credentials in Vaultwarden ('CouchDB - Obsidian LiveSync'); .env is
gitignored, .env.example carries a placeholder.
Prometheus probe added (probe_success=1). Vault database: 'secondbrain'.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
946 B
YAML
28 lines
946 B
YAML
services:
|
|
couchdb:
|
|
image: couchdb:3.4
|
|
container_name: couchdb
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5984:5984"
|
|
environment:
|
|
- COUCHDB_USER=${COUCHDB_USER}
|
|
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
|
|
- TZ=America/Chicago
|
|
volumes:
|
|
# LOCAL disk, not NFS: CouchDB's file locking breaks over NFSv3, the same
|
|
# way it did for guacamole-db (MySQL) and semaphore-db.
|
|
- /var/lib/couchdb/data:/opt/couchdb/data
|
|
# NOT :ro -- CouchDB 3.x writes runtime config back into the last-loaded ini.
|
|
# With a read-only mount it exits 1 immediately and logs NOTHING at all.
|
|
- /var/lib/couchdb/config/local.ini:/opt/couchdb/etc/local.d/local.ini
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=false"
|
|
mem_limit: 1g
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:5984/_up"]
|
|
interval: 60s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|