couchdb.yml

 

2023-07-13

Docker Compose 配置文件:

1
version: "2.1"
2
services:
3
couchdb:
4
image: couchdb
5
container_name: obsidian-livesync
6
user: 1000:1000
7
environment:
8
- COUCHDB_USER=admin
9
- COUCHDB_PASSWORD=password
10
volumes:
11
- ./data:/opt/couchdb/data
12
- ./local.ini:/opt/couchdb/etc/local.ini
13
ports:
14
- 5984:5984
15
restart: unless-stopped

local.ini 内容:

1
[couchdb]
2
single_node=true
3
max_document_size = 50000000
4
5
[chttpd]
6
require_valid_user = true
7
max_http_request_size = 4294967296
8
9
[chttpd_auth]
10
require_valid_user = true
11
authentication_redirect = /_utils/session.html
12
13
[httpd]
14
WWW-Authenticate = Basic realm="couchdb"
15
enable_cors = true
16
17
[cors]
18
origins = app://obsidian.md,capacitor://localhost,http://localhost
19
credentials = true
20
headers = accept, authorization, content-type, origin, referer
21
methods = GET, PUT, POST, HEAD, DELETE
22
max_age = 3600