From 1f1a39e5a070b47fd053614f5da2073ea2f19880 Mon Sep 17 00:00:00 2001 From: James Armstrong <32995055+jmarmstrong1207@users.noreply.github.com> Date: Mon, 28 Apr 2025 06:10:29 -0700 Subject: [PATCH] Add simple docker compose --- docs/setup_own_server.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/setup_own_server.md b/docs/setup_own_server.md index 9fa72c7..9b0a471 100644 --- a/docs/setup_own_server.md +++ b/docs/setup_own_server.md @@ -49,6 +49,23 @@ Once CouchDB run, these directories will be owned by uid:`5984`. Please chown it ``` $ docker run --name couchdb-for-ols -d --restart always -e COUCHDB_USER=${username} -e COUCHDB_PASSWORD=${password} -v ${PWD}/couchdb-data:/opt/couchdb/data -v ${PWD}/couchdb-etc:/opt/couchdb/etc/local.d -p 5984:5984 couchdb ``` +If you prefer a compose file instead of docker run, here is the equivalent below: +``` +services: + couchdb: + image: couchdb:latest + container_name: couchdb-for-ols + user: 1000:1000 + environment: + - COUCHDB_USER=${username} + - COUCHDB_PASSWORD=${password} + volumes: + - ./couchdb-data:/opt/couchdb/data + - ./couchdb-etc:/opt/couchdb/etc/local.d + ports: + - 5984:5984 + restart: unless-stopped +``` ### B. Install CouchDB directly Please refer to the [official document](https://docs.couchdb.org/en/stable/install/index.html). However, we do not have to configure it fully. Just the administrator needs to be configured.