-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
189 lines (178 loc) · 4.17 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
version: "3.8"
services:
# Auth service
auth-service:
container_name: 'auth_service'
build:
context: .
dockerfile: services/auth-service/Dockerfile.dev
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:8001/auth/v1.0/health"
]
interval: 1m
timeout: 3s
start_period: 10s
retries: 3
ports:
- '8001:8001'
depends_on:
- vault-dev-server
- mongodb
- jaeger
- redis
networks:
- docker_net
# User service
user-service:
container_name: 'user_service'
build:
context: .
dockerfile: services/user-service/Dockerfile.dev
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:8002/user/v1.0/health"
]
interval: 1m
timeout: 3s
start_period: 10s
retries: 3
ports:
- '8002:8002'
depends_on:
- vault-dev-server
- mongodb
- jaeger
- redis
networks:
- docker_net
# Tenant service
tenant-service:
container_name: 'tenant_service'
build:
context: .
dockerfile: services/tenant-service/Dockerfile.dev
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:8003/tenant/v1.0/health"
]
interval: 1m
timeout: 3s
start_period: 10s
retries: 3
ports:
- '8003:8003'
depends_on:
- vault-dev-server
- mongodb
- jaeger
- redis
networks:
- docker_net
# Notification service
notification-service:
container_name: 'notification_service'
build:
context: .
dockerfile: services/notification-service/Dockerfile.dev
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:8005/notification/v1.0/health"
]
interval: 1m
timeout: 3s
start_period: 10s
retries: 3
ports:
- '8005:8005'
depends_on:
- vault-dev-server
- jaeger
- redis
networks:
- docker_net
# Vault server UI can be viewed at http://localhost:8200/ui
vault-dev-server:
image: hashicorp/vault:latest
container_name: vault_dev_server
restart: always
volumes:
- /vault/data
- /etc/vault/logs
ports:
- '8200:8200'
environment:
VAULT_DEV_ROOT_TOKEN_ID: 'token-root-dont-use-in-production'
VAULT_DEV_LISTEN_ADDRESS: '0.0.0.0:8200'
cap_add:
- IPC_LOCK
networks:
- docker_net
entrypoint: "vault server -dev"
# Vault client to initialize secret engines and to inject secrets in vault-server
vault-dev-client:
container_name: vault_dev_client
build:
context: .
dockerfile: docker/Dockerfile.vault_client.dev
environment:
VAULT_ADDR: 'http://vault_dev_server:8200'
VAULT_DEV_ROOT_TOKEN_ID: 'token-root-dont-use-in-production'
depends_on:
- vault-dev-server
networks:
- docker_net
mongodb:
image: 'mongo:latest'
container_name: 'mongodb'
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: 'test_user'
MONGO_INITDB_ROOT_PASSWORD: 'test_password'
networks:
- docker_net
# Opentelemetry - jaeger, UI available on http://localhost:16686/
jaeger:
image: jaegertracing/all-in-one:latest
container_name: 'jaeger'
restart: always
ports:
- '5775:5775/udp'
- '6831:6831/udp'
- '6832:6832/udp'
- '5778:5778'
- '16686:16686'
- '14268:14268'
- '9411:9411'
networks:
- docker_net
redis:
image: redis:latest
container_name: redis
restart: always
command: redis-server --requirepass test_password
ports:
- '6379:6379'
networks:
- docker_net
nats-server:
image: nats-streaming:alpine3.15
container_name: nats_server
ports:
- "8222:8222"
- "4222:4222"
networks:
docker_net: