-
Notifications
You must be signed in to change notification settings - Fork 31
/
docker-compose-tests.yml
175 lines (164 loc) · 5.38 KB
/
docker-compose-tests.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: '3.7'
services:
# 3 replica sets: primary rs1
rs1-test:
container_name: rs1-test
image: mongo
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: always
command: mongod --replSet replica-set
networks:
panic_net:
ipv4_address: '${DB_IP_REPLICA_1_TEST}'
rs2-test:
container_name: rs2-test
image: mongo
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: always
command: mongod --replSet replica-set
networks:
panic_net:
ipv4_address: '${DB_IP_REPLICA_2_TEST}'
rs3-test:
container_name: rs3-test
image: mongo
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: always
command: mongod --replSet replica-set
networks:
panic_net:
ipv4_address: '${DB_IP_REPLICA_3_TEST}'
# simply container to startup the replica set
mongo-startup-test:
container_name: mongo-startup-test
image: mongo
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
# this container will exit after executing the command
restart: "no"
depends_on:
- rs1-test
- rs2-test
- rs3-test
command: >
mongosh --host rs1-test:27017 --eval 'db=(new Mongo("rs1-test:27017")).getDB("local");
config = {
"_id" : "replica-set",
"members" : [
{"_id" : 0,"host" : "rs1-test:27017"},
{"_id" : 1,"host" : "rs2-test:27017"},
{"_id" : 2,"host" : "rs3-test:27017"}
]
};
rs.initiate(config);'
networks:
panic_net:
ipv4_address: '${DB_IP_REPLICA_STARTUP_TEST}'
redis-test:
image: 'redis'
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
networks:
panic_net:
ipv4_address: '${REDIS_IP_TEST}'
restart: always
container_name: 'redis-test'
rabbitmq-test:
image: 'rabbitmq:3-management'
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
networks:
panic_net:
ipv4_address: '${RABBIT_IP_TEST}'
restart: always
container_name: 'rabbitmq-test'
test-suite:
environment:
- 'UNIQUE_ALERTER_IDENTIFIER=${UNIQUE_ALERTER_IDENTIFIER}'
- 'DB_NAME=${DB_NAME}'
- 'DB_IP=${DB_IP_REPLICA_1_TEST}'
- 'DB_PORT=${DB_PORT}'
- 'REDIS_DB=${REDIS_DB_TEST}'
- 'REDIS_IP=${REDIS_IP_TEST}'
- 'REDIS_PORT=${REDIS_PORT}'
- 'RABBIT_IP=${RABBIT_IP_TEST}'
- 'RABBIT_PORT=${RABBIT_PORT}'
- 'LOGGING_LEVEL=${LOGGING_LEVEL}'
- 'DATA_STORE_LOG_FILE_TEMPLATE=${DATA_STORE_LOG_FILE_TEMPLATE}'
- 'MONITORS_LOG_FILE_TEMPLATE=${MONITORS_LOG_FILE_TEMPLATE}'
- 'TRANSFORMERS_LOG_FILE_TEMPLATE=${TRANSFORMERS_LOG_FILE_TEMPLATE}'
- 'MANAGERS_LOG_FILE_TEMPLATE=${MANAGERS_LOG_FILE_TEMPLATE}'
- 'ALERTERS_LOG_FILE_TEMPLATE=${ALERTERS_LOG_FILE_TEMPLATE}'
- 'ALERT_ROUTER_LOG_FILE=${ALERT_ROUTER_LOG_FILE}'
- 'CONFIG_MANAGER_LOG_FILE=${CONFIG_MANAGER_LOG_FILE}'
- 'GITHUB_RELEASES_TEMPLATE=${GITHUB_RELEASES_TEMPLATE}'
- 'SYSTEM_MONITOR_PERIOD_SECONDS=${SYSTEM_MONITOR_PERIOD_SECONDS}'
- 'GITHUB_MONITOR_PERIOD_SECONDS=${GITHUB_MONITOR_PERIOD_SECONDS}'
- 'DOCKERHUB_MONITOR_PERIOD_SECONDS=${DOCKERHUB_MONITOR_PERIOD_SECONDS}'
- 'DATA_TRANSFORMER_PUBLISHING_QUEUE_SIZE=${DATA_TRANSFORMER_PUBLISHING_QUEUE_SIZE}'
- 'ALERTER_PUBLISHING_QUEUE_SIZE=${ALERTER_PUBLISHING_QUEUE_SIZE}'
- 'ALERT_ROUTER_PUBLISHING_QUEUE_SIZE=${ALERT_ROUTER_PUBLISHING_QUEUE_SIZE}'
- 'CONFIG_PUBLISHING_QUEUE_SIZE=${CONFIG_PUBLISHING_QUEUE_SIZE}'
- 'ENABLE_CONSOLE_ALERTS=${ENABLE_CONSOLE_ALERTS}'
- 'ENABLE_LOG_ALERTS=${ENABLE_LOG_ALERTS}'
- 'CHANNEL_HANDLERS_LOG_FILE_TEMPLATE=${CHANNEL_HANDLERS_LOG_FILE_TEMPLATE}'
- 'ALERTS_LOG_FILE=${ALERTS_LOG_FILE}'
- 'TWIML=${TWIML}'
- 'TWIML_IS_URL=${TWIML_IS_URL}'
- 'CHANNELS_MANAGER_PUBLISHING_QUEUE_SIZE=${CHANNELS_MANAGER_PUBLISHING_QUEUE_SIZE}'
- 'HEALTH_CHECKER_LOG_FILE_TEMPLATE=${HEALTH_CHECKER_LOG_FILE_TEMPLATE}'
- 'NODE_MONITOR_PERIOD_SECONDS=${NODE_MONITOR_PERIOD_SECONDS}'
- 'CHAINLINK_CONTRACTS_MONITOR_PERIOD_SECONDS=${CHAINLINK_CONTRACTS_MONITOR_PERIOD_SECONDS}'
- 'NETWORK_MONITOR_PERIOD_SECONDS=${NETWORK_MONITOR_PERIOD_SECONDS}'
- 'DOCKERHUB_TAGS_TEMPLATE=${DOCKERHUB_TAGS_TEMPLATE}'
- 'SUBSTRATE_API_IP=${SUBSTRATE_API_IP}'
- 'SUBSTRATE_API_PORT=${SUBSTRATE_API_PORT}'
- 'WAIT_HOSTS=${DB_IP_REPLICA_1_TEST}:${DB_PORT}, ${DB_IP_REPLICA_2_TEST}:${DB_PORT}, ${DB_IP_REPLICA_3_TEST}:${DB_PORT}, ${REDIS_IP_TEST}:${REDIS_PORT}, ${RABBIT_IP_TEST}:${RABBIT_PORT}'
build:
context: './'
dockerfile: './alerter/Tests_Dockerfile'
image: 'simplyvc/panic_alerter_tests:1.3.0'
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
volumes:
- './config:/opt/panic/config'
- './alerter/logs:/opt/panic/alerter/logs'
networks:
panic_net:
ipv4_address: '${TESTS_IP}'
depends_on:
- redis-test
- rabbitmq-test
- mongo-startup-test
networks:
panic_net:
ipam:
driver: default
config:
- subnet: 172.19.0.0/24
volumes:
db-data: