-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose-cluster.yaml
134 lines (128 loc) · 4.69 KB
/
docker-compose-cluster.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.7'
services:
eventstore1:
image: eventstore/eventstore:22.10.0-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node1.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
# - EVENTSTORE_DISCOVER_VIA_DNS=False
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INT_IP=192.168.33.10
- EVENTSTORE_EXT_IP=192.168.33.10
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node.key
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
expose:
- "1112"
- "1113"
- "2113"
ports:
- "1112:1112"
- "1113:1113"
- "2113:2113"
networks:
app_net:
aliases:
- cluster.tests.node-eventstore-client.local
- node1.tests.node-eventstore-client.local
ipv4_address: 192.168.33.10
volumes:
- eventstore1-data:/var/lib/eventstore
- ./certs:/etc/eventstore/certs:ro
eventstore2:
image: eventstore/eventstore:22.10.0-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node2.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
# - EVENTSTORE_DISCOVER_VIA_DNS=False
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INT_IP=192.168.33.11
- EVENTSTORE_EXT_IP=192.168.33.11
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node2/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node2/node.key
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
expose:
- "1113"
- "1112"
- "2113"
networks:
app_net:
aliases:
- cluster.tests.node-eventstore-client.local
- node2.tests.node-eventstore-client.local
ipv4_address: 192.168.33.11
volumes:
- eventstore2-data:/var/lib/eventstore
- ./certs:/etc/eventstore/certs:ro
eventstore3:
image: eventstore/eventstore:22.10.0-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node3.tests.node-eventstore-client.local
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
# - EVENTSTORE_DISCOVER_VIA_DNS=False
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INT_IP=192.168.33.12
- EVENTSTORE_EXT_IP=192.168.33.12
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node3/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node3/node.key
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
expose:
- "1113"
- "1112"
- "2113"
networks:
app_net:
aliases:
- cluster.tests.node-eventstore-client.local
- node3.tests.node-eventstore-client.local
ipv4_address: 192.168.33.12
volumes:
- eventstore3-data:/var/lib/eventstore-data
- ./certs:/etc/eventstore/certs:ro
nodejs:
image: node:14
working_dir: /var/build
volumes:
- ./:/var/code:ro
- ./build-and-test.sh:/var/build/build-and-test.sh:ro
- ./certs:/var/certs:ro
environment:
- NODE_EXTRA_CA_CERTS=/var/certs/ca/ca.crt
command: bash -c "tail -f /dev/null"
networks:
app_net:
ipv4_address: 192.168.33.5
volumes:
eventstore1-data:
eventstore2-data:
eventstore3-data:
networks:
app_net:
ipam:
driver: default
config:
- subnet: "192.168.33.0/24"