Skip to content

Instantly share code, notes, and snippets.

@mrsarm
Last active March 18, 2021 12:37
Show Gist options
  • Save mrsarm/abed84dad3377e44689f46ea7808789f to your computer and use it in GitHub Desktop.
Save mrsarm/abed84dad3377e44689f46ea7808789f to your computer and use it in GitHub Desktop.
docker-compose.yml CouchDB latest: launch a CouchDB server with a volume attached to persist data across sessions
couchdb-latest:
image: couchdb
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=couch
ports:
- "5984:5984"
volumes:
- couchdb-data-latest:/opt/couchdb/data
- couchdb-conf-latest:/opt/couchdb/etc/local.d
# - `docker-compose up' to start CouchDB attached to the console, or `.. start' detached
# - Connect to the "Fauxton" admin: http://127.0.0.1:5984/_utils/
# - `docker-compose stop' to shutdown the service if it was started detached,
# otherwise just press Ctrl+C to stop
# - `docker-compose down' to shutdown and drop the container (the data will continue
# stored in the 'couchdb-data-latest' volume)
# - `docker volume rm couchdb-data-latest' to drop the data from the volume (first
# execute `docker-compose down')
# - `~/bin/docker-volume-cp couchdb-data-latest couchdb-data-latest-backup-DAY' to backup the
# DB to a new volume
@mrsarm
Copy link
Author

mrsarm commented Sep 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment