-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
239 lines (226 loc) · 6.14 KB
/
docker-compose.yaml
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
version: "3.7"
services:
reverse-proxy:
container_name: ms-reverse-proxy
image: traefik:v2.9
command:
- "--accesslog"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.file.directory=/configuration/"
- "--providers.file.watch=true"
ports:
- ${TRAEFIC_PORT_HTTP:-80}:80
labels:
- "traefik.enable=true"
- "traefik.http.routers.buggregator-reverse-proxy.entrypoints=web"
- "traefik.http.routers.buggregator-reverse-proxy.rule=Host(`traefik.ms.localhost`)"
- "traefik.http.services.buggregator-reverse-proxy.loadbalancer.server.port=8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- ms-network
logging:
driver: none
web:
container_name: ms-web
build:
context: .
args:
SERVICE_NAME: web
dockerfile: .docker/php/Dockerfile
env_file:
- .env
environment:
DB_DATABASE: homestead
RR_LOG_LEVEL: ${RR_LOG_LEVEL:-debug}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-php-web}
volumes:
- ./web:/app
- ./proto:/proto
labels:
- "traefik.enable=true"
- "traefik.http.routers.ms-web.entrypoints=web"
- "traefik.http.routers.ms-web.rule=Host(`ms.localhost`)"
- "traefik.http.services.ms-web.loadbalancer.server.port=8080"
networks:
- ms-network
users:
container_name: ms-users
build:
context: .
args:
SERVICE_NAME: users
dockerfile: .docker/php/Dockerfile
env_file:
- .env
environment:
DB_CONNECTION: pgsql
DB_DATABASE: users
RR_LOG_LEVEL: ${RR_LOG_LEVEL:-debug}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-php-users}
volumes:
- ./users:/app
- ./proto:/proto
networks:
- ms-network
subscriptions:
container_name: ms-subscriptions
build:
context: .
args:
SERVICE_NAME: subscriptions
dockerfile: .docker/php/Dockerfile
env_file:
- .env
environment:
DB_CONNECTION: pgsql
DB_DATABASE: subscriptions
RR_LOG_LEVEL: ${RR_LOG_LEVEL:-debug}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-php-subscriptions}
volumes:
- ./subscriptions:/app
- ./proto:/proto
networks:
- ms-network
notifications:
container_name: ms-notifications
build:
context: .
args:
SERVICE_NAME: notifications
dockerfile: .docker/php/Dockerfile
env_file:
- .env
environment:
DB_CONNECTION: pgsql
DB_DATABASE: notifications
RR_LOG_LEVEL: ${RR_LOG_LEVEL:-debug}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-php-notifications}
volumes:
- ./notifications:/app
- ./proto:/proto
networks:
- ms-network
db:
container_name: ms-db
image: postgres
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: homestead
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- type: bind
source: ./.docker-data/db
target: /var/lib/postgresql/data
healthcheck:
test: pg_isready -d $$POSTGRES_USER -U $$POSTGRES_USER
interval: 2s
timeout: 5s
start_period: 2s
ports:
- "5432:5432"
restart: on-failure
networks:
- ms-network
logging:
driver: none
buggregator:
container_name: ms-buggregator
image: ghcr.io/buggregator/server:latest
restart: on-failure
ports:
- "9912:9912"
- "9913:9913"
- "1025:1025"
labels:
- "traefik.enable=true"
- "traefik.http.routers.ms-buggregator.entrypoints=web"
- "traefik.http.routers.ms-buggregator.rule=Host(`buggregator.ms.localhost`)"
- "traefik.http.services.ms-buggregator.loadbalancer.server.port=8000"
networks:
- ms-network
logging:
driver: none
collector:
container_name: ms-collector
image: otel/opentelemetry-collector-contrib
command: [ "--config=/etc/otel-collector-config.yml" ]
volumes:
- ./.docker/otel/otel-collector-config.yml:/etc/otel-collector-config.yml
networks:
- ms-network
# logging:
# driver: none
zipkin:
container_name: ms-zipkin
image: openzipkin/zipkin-slim
labels:
- "traefik.enable=true"
- "traefik.http.routers.ms-zipkin.entrypoints=web"
- "traefik.http.routers.ms-zipkin.rule=Host(`zipkin.ms.localhost`)"
- "traefik.http.services.ms-zipkin.loadbalancer.server.port=9411"
networks:
- ms-network
logging:
driver: none
adminer:
container_name: ms-adminer
image: adminer
restart: unless-stopped
environment:
ADMINER_DEFAULT_SERVER: ${ADMINER_DEFAULT_SERVER:-db}
networks:
- ms-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.adminer.entrypoints=web"
- "traefik.http.routers.adminer.rule=Host(`adminer.ms.localhost`)"
logging:
driver: none
temporal:
container_name: ms-temporal
environment:
DB: postgres12
DB_PORT: 5432
POSTGRES_USER: homestead
POSTGRES_PWD: secret
POSTGRES_SEEDS: db
DYNAMIC_CONFIG_FILE_PATH: config/dynamicconfig/development-sql.yaml
image: temporalio/auto-setup:1.22.5
volumes:
- ./.docker/temporalio:/etc/temporal/config/dynamicconfig
restart: unless-stopped
depends_on:
db:
condition: service_healthy
networks:
- ms-network
temporal-ui:
container_name: ms-temporal-ui
depends_on:
temporal:
condition: service_started
environment:
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_CORS_ORIGINS: http://localhost:3000
image: temporalio/ui
restart: unless-stopped
networks:
- ms-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.temporal.entrypoints=web"
- "traefik.http.routers.temporal.rule=Host(`temporal.ms.localhost`)"
- "traefik.http.services.temporal.loadbalancer.server.port=8080"
logging:
driver: none
networks:
ms-network:
ipam:
driver: default
config:
- subnet: 172.0.13.0/24