Overview
This template provides a production‑ready Apache CouchDB instance as a Monk runnable. You can:- Run it directly to get a managed CouchDB container with sensible defaults
- Inherit it in your own runnable to seamlessly add a document-oriented NoSQL database to your stack
What this template manages
- CouchDB container (
couchdbimage, configurable tag) - Network service on port 5984 (HTTP API)
- Persistent volumes for data storage
- Admin user authentication
- Custom configuration file support
Quick start (run directly)
- Load templates
- Run CouchDB with defaults
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesincouchdb/couchdb.yaml, thenmonk load MANIFESTand run.
http://localhost:5984 (or the runnable hostname inside Monk networks) using the configured credentials.
Configuration
Key variables you can customize in this template:${monk-volume-path}/couchdb on the host.
Configuration files
You can find a configuration file in/files directory. The local.ini file can be edited before running the template.
| Configuration File | Directory in Container | Purpose |
|---|---|---|
| local.ini | /opt/couchdb/etc/local.d/local.ini | Primary configuration file for most settings |
Use by inheritance (recommended for apps)
Inherit the CouchDB runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
couchdbon TCP port5984 - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the DB host.
Persistence and configuration
- Data path:
${monk-volume-path}/couchdb:/opt/couchdb/data - Config path:
/opt/couchdb/etc/local.d/local.ini - CouchDB stores all databases and documents in the data directory
Web Interface
CouchDB includes Fauxton, a built-in web interface for database administration. Access it athttp://localhost:5984/_utils/.
Related templates
- See other templates in this repository for complementary services
- Combine with monitoring tools (
prometheus-grafana/) for observability - Integrate with your application stack as needed
Troubleshooting
- If you changed
couchdb-passwordbut the container has existing data, authentication may fail. Either reset the data volume or update the password inside the DB to match. - Ensure the host volumes are writable by the container user.
- Check logs:
- Verify CouchDB is responding: