This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
77 lines (77 loc) · 2.1 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
73
74
75
76
77
#
# CouchDB Docker Sandbox
#
# See README.md for details.
#
version: '3.5'
networks:
cluster:
name: cluster
services:
cluster-lb:
build: ./cluster-lb
image: cluster-lb:latest
container_name: cluster-lb
depends_on:
- node1
- node2
- node3
networks:
- cluster
ports:
- 5984:5984
cluster-init:
build: ./cluster-init
image: cluster-init:latest
container_name: cluster-init
depends_on:
- node1
- node2
- node3
networks:
- cluster
node1:
build: ./cluster-node
image: cluster-node:latest
container_name: node1
volumes:
- ./nodes/1/data:/opt/couchdb/data
- ./nodes/1/etc:/opt/couchdb/etc/local.d
- ./nodes/1/log:/opt/couchdb/log
environment:
- NODENAME=node1.cluster # This must be the _FQDN_ of the node within the cluster network
- ERL_FLAGS=-setcookie "relax"
networks:
- cluster
#ports:
# - 59841:5984 # Uncomment to enable direct access to the node
node2:
build: ./cluster-node
image: cluster-node:latest
container_name: node2
volumes:
- ./nodes/2/data:/opt/couchdb/data
- ./nodes/2/etc:/opt/couchdb/etc/local.d
- ./nodes/2/log:/opt/couchdb/log
environment:
- NODENAME=node2.cluster # This must be the _FQDN_ of the node within the cluster network
- ERL_FLAGS=-setcookie "relax"
networks:
- cluster
#ports:
# - 59842:5984 # Uncomment to enable direct access to node
node3:
build: ./cluster-node
image: cluster-node:latest
container_name: node3
volumes:
- ./nodes/3/data:/opt/couchdb/data
- ./nodes/3/etc:/opt/couchdb/etc/local.d
- ./nodes/3/log:/opt/couchdb/log
environment:
- NODENAME=node3.cluster # This must be the _FQDN_ of the node within the cluster network
- ERL_FLAGS=-setcookie "relax"
networks:
- cluster
#ports:
# - 59843:5984 # Uncomment to enable direct access to node