-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
222 lines (221 loc) · 6.28 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
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
version: "3"
services:
backoffice-app-web-service:
build:
context: backoffice-service
volumes:
- "./backoffice-service:/data/app"
working_dir: "/data/app"
networks:
- default
environment:
APP_ENV: "dev"
APP_DEBUG: "true"
DATABASE_DSN: pgsql://ecotone:secret@backoffice-app-database:5432/ecotone
RABBIT_HOST: "rabbitmq"
RUN_MIGRATION: "true"
APP_INSTALL_DEPENDENCIES: "yes"
COMPOSER_HOME: /data/app
COMPOSE_HTTP_TIMEOUT: 9999
OTEL_SERVICE_NAME: 'backoffice_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
depends_on:
- backoffice-app-database
- rabbitmq
ports:
- 3001:80
backoffice-app-projections:
build:
context: backoffice-service
volumes:
- "./backoffice-service:/data/app"
working_dir: "/data/app"
user: 1000:1000
networks:
- default
environment:
APP_ENV: "dev"
APP_DEBUG: "true"
COMPOSER_HOME: /data/app
COMPOSE_HTTP_TIMEOUT: 9999
DATABASE_DSN: pgsql://ecotone:secret@backoffice-app-database:5432/ecotone
RABBIT_HOST: "rabbitmq"
OTEL_SERVICE_NAME: 'backoffice_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
depends_on:
- backoffice-app-database
- rabbitmq
restart: always
entrypoint: ""
command: "/data/app/bin/console ecotone:run asynchronous_projections -vvv"
backoffice-distributed-consumer:
build:
context: backoffice-service
volumes:
- "./backoffice-service:/data/app"
working_dir: "/data/app"
user: 1000:1000
networks:
- default
environment:
APP_ENV: "dev"
APP_DEBUG: "true"
COMPOSER_HOME: /data/app
COMPOSE_HTTP_TIMEOUT: 9999
DATABASE_DSN: pgsql://ecotone:secret@backoffice-app-database:5432/ecotone
RABBIT_HOST: "rabbitmq"
OTEL_SERVICE_NAME: 'backoffice_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
depends_on:
- backoffice-app-database
- rabbitmq
restart: always
entrypoint: ""
command: "/data/app/bin/console ecotone:run backoffice_service -vvv"
backoffice-app-database:
image: postgres:12.1
networks:
- default
ports:
- "3002:5432"
environment:
POSTGRES_USER: "ecotone"
POSTGRES_PASSWORD: "secret"
customer-app-web-service:
build:
context: customer-service
volumes:
- "./customer-service:/data/app"
working_dir: "/data/app"
environment:
DATABASE_URL: mysql://admin:hash@customer-app-database/customer_app
APP_INSTALL_DEPENDENCIES: "yes"
COMPOSER_HOME: /data/app
COMPOSE_HTTP_TIMEOUT: 9999
OTEL_SERVICE_NAME: 'customer_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_PHP_DEBUG_SCOPES_DISABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
networks:
- default
ports:
- "3000:80"
depends_on:
- customer-app-database
- mailhog
- rabbitmq
customer-distributed-consumer:
build:
context: customer-service
volumes:
- "./customer-service:/data/app"
working_dir: "/data/app"
environment:
OTEL_SERVICE_NAME: 'customer_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
networks:
- default
restart: always
entrypoint: ""
command: "php artisan ecotone:run customer_service -vvv"
depends_on:
- customer-app-database
- mailhog
- rabbitmq
customer-notifications-consumer:
build:
context: customer-service
volumes:
- "./customer-service:/data/app"
working_dir: "/data/app"
environment:
OTEL_SERVICE_NAME: 'customer_service'
OTEL_PHP_AUTOLOAD_ENABLED: true
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_PROPAGATORS: baggage,tracecontext
networks:
- default
restart: always
entrypoint: ""
command: "php artisan ecotone:run notifications -vvv"
depends_on:
- customer-app-database
- mailhog
- rabbitmq
customer-app-database:
image: 'mysql/mysql-server:8.0'
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: customer_app
MYSQL_USER: admin
MYSQL_PASSWORD: hash
ports:
- "3003:3306"
networks:
- default
mailhog:
image: 'mailhog/mailhog'
networks:
- default
ports:
- "3004:8025"
rabbitmq:
image: rabbitmq:3.8-management-alpine
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
networks:
- default
ports:
- "3005:15672"
pulse:
image: ecotoneframework/ecotone-pulse:0.1.0
working_dir: "/data/app"
networks:
- default
environment:
SERVICES: '[{"name":"customer_service","databaseDsn":"mysql://admin:hash@customer-app-database/customer_app"},{"name":"backoffice_service","databaseDsn":"pgsql://ecotone:secret@backoffice-app-database:5432/ecotone"}]'
AMQP_DSN: "amqp://guest:guest@rabbitmq:5672//"
ports:
- 3006:80
jaeger:
image: jaegertracing/all-in-one:latest
environment:
COLLECTOR_OTLP_ENABLED: "true"
networks:
- default
ports:
- 3007:16686