-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.cluster.yml
144 lines (144 loc) · 3.75 KB
/
docker-compose.cluster.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
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
135
136
137
138
139
140
141
142
143
144
version: "3"
services:
tunnel:
image: dbluhm/agent-tunnel
command: -s reverse-proxy:80 -p 4040 -h ${AGENT_TUNNEL_HOST}
ports:
- 4040:4040
networks:
- acapy_default
agent:
image: acapy-cache-redis
build:
context: ./
dockerfile: ./docker/Dockerfile
depends_on:
- redis-cluster
links:
- redis-cluster
- reverse-proxy
ports:
- 3000:3000
- 3001:3001
volumes:
- ./acapy-endpoint.sh:/acapy-endpoint.sh:ro,z
- ./acapy_cache_redis:/home/indy/acapy_cache_redis:ro,z
- ./docker/default_cluster.yml:/home/indy/default.yml:ro,z
environment:
TUNNEL_ENDPOINT: http://tunnel:4040
entrypoint: >
/bin/sh -c '/acapy-endpoint.sh poetry run aca-py "$$@"' --
command: >
start --arg-file default.yml
networks:
- acapy_default
reverse-proxy:
image: nginx:alpine
restart: unless-stopped
environment:
AGENT_HTTP: "agent:3000"
AGENT_WS: "agent:3002"
ports:
- 80:80
volumes:
- ./nginx.conf.template:/etc/nginx/templates/default.conf.template:z
networks:
- acapy_default
redis-cluster:
image: redis:latest
container_name: cluster
command: redis-cli --cluster create 172.28.0.101:6377 172.28.0.102:6378 172.28.0.103:6379 172.28.0.104:6380 172.28.0.105:6381 172.28.0.106:6382 --cluster-replicas 1 --cluster-yes
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
networks:
acapy_default:
ipv4_address: 172.28.0.107
depends_on:
- redis-node-1
- redis-node-2
- redis-node-3
- redis-node-4
- redis-node-5
- redis-node-6
redis-node-1:
image: redis:latest
container_name: node1
command: [ "redis-server", "/conf/redis.conf", "--port 6377" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6377:6377
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.101
redis-node-2:
image: redis:latest
container_name: node2
command: [ "redis-server", "/conf/redis.conf", "--port 6378" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6378:6378
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.102
redis-node-3:
image: redis:latest
container_name: node3
command: [ "redis-server", "/conf/redis.conf", "--port 6379" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6379:6379
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.103
redis-node-4:
image: redis:latest
container_name: node4
command: [ "redis-server", "/conf/redis.conf", "--port 6380" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6380:6380
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.104
redis-node-5:
image: redis:latest
container_name: node5
command: [ "redis-server", "/conf/redis.conf", "--port 6381" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6381:6381
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.105
redis-node-6:
image: redis:latest
container_name: node6
command: [ "redis-server", "/conf/redis.conf", "--port 6382" ]
environment:
- REDISCLI_AUTH=${REDIS_PASSWORD}
ports:
- 6382:6382
volumes:
- ./redis_cluster.conf:/conf/redis.conf
networks:
acapy_default:
ipv4_address: 172.28.0.106
networks:
acapy_default:
external: true
name: ${NETWORK_NAME}