forked from w3f/1k-validators-be
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.microservice.yml
168 lines (157 loc) · 3.34 KB
/
docker-compose.microservice.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
version: '3.8'
services:
1kv-core:
build:
context: .
args:
PACKAGE: core
dockerfile: ./Dockerfile
depends_on:
- redis
ports:
- "127.0.0.1:3300:3300"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:3300/healthcheck" ]
interval: 60s
timeout: 60s
retries: 3
start_period: 180s
deploy:
restart_policy:
condition: on-failure
delay: 300s
max_attempts: 3
window: 120s
networks:
testing_net:
ipv4_address: 172.28.1.1
1kv-gateway:
build:
context: .
args:
PACKAGE: gateway
dockerfile: ./Dockerfile
depends_on:
- redis
ports:
- "127.0.0.1:3301:3301"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3301/healthcheck"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
restart_policy:
condition: on-failure
delay: 300s
max_attempts: 3
window: 120s
networks:
testing_net:
ipv4_address: 172.28.1.2
1kv-telemetry:
build:
context: .
args:
PACKAGE: telemetry
dockerfile: ./Dockerfile
depends_on:
- redis
ports:
- "127.0.0.1:3302:3302"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:3302/healthcheck" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
deploy:
restart_policy:
condition: on-failure
delay: 300s
max_attempts: 3
window: 120s
networks:
testing_net:
ipv4_address: 172.28.1.3
1kv-worker:
build:
context: .
args:
PACKAGE: worker
dockerfile: ./Dockerfile
deploy:
# mode: replicated
# replicas: 8
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 3
window: 120s
depends_on:
- redis
- mongo
ports:
- "127.0.0.1:3303:3303"
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:3303/healthcheck" ]
interval: 30s
timeout: 60s
retries: 3
start_period: 180s
networks:
testing_net:
# ipv4_address: 172.28.1.3
mongo:
image: mongo
restart: always
ports:
- "127.0.0.1:27017:27017"
networks:
testing_net:
ipv4_address: 172.28.1.4
logging:
driver: "json-file"
options:
max-size: "50m"
mongo-express:
image: mongo-express
environment:
- ME_CONFIG_MONGODB_SERVER=mongo
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
depends_on:
- mongo
ports:
- "127.0.0.1:8888:8081"
networks:
testing_net:
ipv4_address: 172.28.1.5
logging:
driver: "json-file"
options:
max-size: "50m"
redis:
image: redis:alpine
expose:
- "6379"
volumes:
- ./redis:/data
restart: always
command: ["redis-server", "--bind", "172.28.1.6", "--port", "6379"]
logging:
driver: "json-file"
options:
max-size: "50m"
networks:
testing_net:
ipv4_address: 172.28.1.6
networks:
testing_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16