forked from gesellix/couchdb-cluster-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (67 loc) · 1.73 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: "3.2"
services:
couchdb1:
image: couchdb:3.3.2
command: -setcookie thecookie
environment:
- "COUCHDB_USER=${COUCHDB_USER:-admin}"
- "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-password}"
- "COUCHDB_SECRET=${COUCHDB_SECRET:-123456}"
- "NODENAME=172.16.238.11"
restart: always
networks:
couchdb-cluster:
ipv4_address: 172.16.238.11
ports:
- "15984:5984"
couchdb2:
image: couchdb:3.3.2
command: -setcookie thecookie
environment:
- "COUCHDB_USER=${COUCHDB_USER:-admin}"
- "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-password}"
- "COUCHDB_SECRET=${COUCHDB_SECRET:-123456}"
- "NODENAME=172.16.238.12"
restart: always
networks:
couchdb-cluster:
ipv4_address: 172.16.238.12
ports:
- "25984:5984"
couchdb3:
image: couchdb:3.3.2
command: -setcookie thecookie
environment:
- "COUCHDB_USER=${COUCHDB_USER:-admin}"
- "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-password}"
- "COUCHDB_SECRET=${COUCHDB_SECRET:-123456}"
- "NODENAME=172.16.238.13"
restart: always
networks:
couchdb-cluster:
ipv4_address: 172.16.238.13
ports:
- "35984:5984"
cluster-setup:
build: .
# image: gesellix/couchdb-cluster-config:latest
command: >-
setup
--delay 10s
--timeout 60s
--username ${COUCHDB_USER:-admin}
--password ${COUCHDB_PASSWORD:-password}
-nodes 172.16.238.11
-nodes 172.16.238.12
-nodes 172.16.238.13
networks:
couchdb-cluster:
ipv4_address: 172.16.238.99
networks:
couchdb-cluster:
driver: overlay
attachable: true
ipam:
driver: default
config:
- subnet: 172.16.238.0/24