-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
97 lines (88 loc) · 2.43 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.3'
networks:
csw_net:
ipam:
driver: default
config:
- subnet: ${SUBNET}
services:
# ========== CSW Services ==========
seed:
image: csw-location:${TAG_ID}
ports:
- ${CLUSTER_PORT}:${CLUSTER_PORT}
- ${LOCATION_SERVER_PORT}:${LOCATION_SERVER_PORT}
- ${ADMIN_PORT}:${ADMIN_PORT}
command:
- "-DCLUSTER_SEEDS=${SEED_IP}:${CLUSTER_PORT}"
- "--clusterPort=${CLUSTER_PORT}"
networks:
csw_net:
ipv4_address: ${SEED_IP}
config:
image: csw-config-server:${TAG_ID}
ports:
- ${CONFIG_PORT}:${CONFIG_PORT}
command:
- "-DCLUSTER_SEEDS=${SEED_IP}:${CLUSTER_PORT}"
- "--initRepo"
networks:
- csw_net
depends_on:
- seed
location-agent:
image: csw-location-agent:${TAG_ID}
command:
- "-DCLUSTER_SEEDS=${SEED_IP}:${CLUSTER_PORT}"
- "--name=EventServer,AlarmServer"
- "--command=sleep 100000"
- "--port=${SENTINEL_PORT}"
networks:
- csw_net
depends_on:
- sentinel
# ========== Sentinel Setup ==========
event_master:
image: redis:latest
ports:
- ${EVENT_MASTER_PORT}:${EVENT_MASTER_PORT}
command: ["redis-server", "--port", "${EVENT_MASTER_PORT}", "--notify-keyspace-events", "K$$x", "--protected-mode", "no"]
networks:
- csw_net
event_slave:
image: redis:latest
ports:
- ${EVENT_SLAVE_PORT}:${EVENT_SLAVE_PORT}
command: ["redis-server", "--port", "${EVENT_SLAVE_PORT}", "--notify-keyspace-events", "K$$x", "--protected-mode", "no"]
networks:
- csw_net
depends_on:
- event_master
alarm_master:
image: redis:latest
ports:
- ${ALARM_MASTER_PORT}:${ALARM_MASTER_PORT}
command: ["redis-server", "--port", "${ALARM_MASTER_PORT}", "--notify-keyspace-events", "K$$x", "--protected-mode", "no"]
networks:
- csw_net
alarm_slave:
image: redis:latest
ports:
- ${ALARM_SLAVE_PORT}:${ALARM_SLAVE_PORT}
command: ["redis-server", "--port", "${ALARM_SLAVE_PORT}", "--notify-keyspace-events", "K$$x", "--protected-mode", "no"]
networks:
- csw_net
depends_on:
- alarm_master
sentinel:
image: redis:latest
ports:
- ${SENTINEL_PORT}:${SENTINEL_PORT}
volumes:
- "./scripts/conf:/data/conf"
command: redis-sentinel /data/conf/redis_sentinel/sentinel.conf
networks:
- csw_net
depends_on:
- event_master
- alarm_master