-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
279 lines (266 loc) · 7.05 KB
/
docker-compose.yml
File metadata and controls
279 lines (266 loc) · 7.05 KB
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
services:
app:
build:
context: .
dockerfile: Dockerfile
environment:
APP_ENV: ${APP_ENV}
APP_DEBUG: ${APP_DEBUG}
KAFKA_BROKERS: kafka:9092
REVERB_APP_ID: ${REVERB_APP_ID}
REVERB_APP_KEY: ${REVERB_APP_KEY}
REVERB_APP_SECRET: ${REVERB_APP_SECRET}
REVERB_HOST: ${REVERB_HOST}
REVERB_PORT: ${REVERB_PORT}
REVERB_SCHEME: ${REVERB_SCHEME}
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NETWORK_TIMEOUT: 0
image: php:8.3-fpm-alpine
ports:
- '${APP_PORT:-8585}:8585'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
restart: unless-stopped
volumes:
- .:/var/www/html
- './docker/php/php.ini:/usr/local/etc/php/conf.d/local.ini'
networks:
- laravel_net
healthcheck:
test: ["CMD", "php", "artisan", "about", "--only=environment"]
interval: 10s
timeout: 10s
retries: 15
start_period: 120s
depends_on:
pgsql:
condition: service_healthy
redis:
condition: service_healthy
meilisearch:
condition: service_healthy
reverb:
image: php:8.3-fpm-alpine
command: php artisan reverb:start --host=0.0.0.0 --port=${REVERB_SERVER_PORT:-8080}
restart: unless-stopped
ports:
- "${REVERB_SERVER_PORT:-8080}:${REVERB_SERVER_PORT:-8080}"
volumes:
- .:/var/www/html
networks:
- laravel_net
depends_on:
app:
condition: service_healthy
pgsql:
image: 'postgres:16-alpine'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
restart: unless-stopped
volumes:
- 'pgsql-data:/var/lib/postgresql/data'
- './docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- laravel_net
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
restart: unless-stopped
volumes:
- 'redis-data:/data'
networks:
- laravel_net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
scheduler:
profiles:
- dev-tools
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
command: >
php artisan schedule:work
volumes:
- .:/var/www/html
networks:
- laravel_net
depends_on:
app:
condition: service_healthy
mailpit:
profiles:
- dev-tools
image: 'axllent/mailpit:latest'
restart: unless-stopped
ports:
- '${FORWARD_MAILPIT_PORT:-1025}:1025'
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
networks:
- laravel_net
meilisearch:
image: 'getmeili/meilisearch:latest'
ports:
- '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
restart: unless-stopped
volumes:
- 'meilisearch-data:/meili_data'
networks:
- laravel_net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 5s
timeout: 5s
retries: 10
start_period: 20s
kafka:
profiles:
- kafka
image: confluentinc/cp-kafka:latest
restart: unless-stopped
ports:
- "9092:9092"
- "9093:9093"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:9093'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LISTENERS: 'PLAINTEXT://:9092,CONTROLLER://:9093'
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
volumes:
- 'kafka-data:/var/lib/kafka/data'
networks:
- laravel_net
healthcheck:
test: [ "CMD-SHELL", "kafka-broker-api-versions.sh --bootstrap-server kafka:9092 || exit 1" ]
interval: 10s
timeout: 10s
retries: 20
start_period: 30s
horizon:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment:
APP_ENV: ${APP_ENV}
APP_DEBUG: ${APP_DEBUG:-false}
REVERB_APP_ID: ${REVERB_APP_ID}
REVERB_APP_KEY: ${REVERB_APP_KEY}
REVERB_APP_SECRET: ${REVERB_APP_SECRET}
REVERB_HOST: ${REVERB_HOST}
REVERB_PORT: ${REVERB_PORT}
REVERB_SCHEME: ${REVERB_SCHEME}
command: >
php artisan horizon
volumes:
- .:/var/www/html
networks:
- laravel_net
depends_on:
app:
condition: service_healthy
redis:
condition: service_healthy
prometheus:
profiles:
- monitoring
image: prom/prometheus:v2.47.2
restart: unless-stopped
ports:
- '9090:9090'
volumes:
- './prometheus:/etc/prometheus'
- 'prometheus-data:/prometheus'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
networks:
- laravel_net
depends_on:
app:
condition: service_healthy
grafana:
profiles:
- monitoring
image: grafana/grafana:10.1.5
ports:
- '3000:3000'
volumes:
- 'grafana-data:/var/lib/grafana'
- './grafana/provisioning:/etc/grafana/provisioning'
environment:
- GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASSWORD:-password}
- GF_INSTALL_PLUGINS=grafana-clickhouse-datasource
- GF_DATASOURCE_HTTP_CLIENT_ALLOW_HOST_REGEX=clickhouse
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
networks:
- laravel_net
depends_on:
prometheus:
condition: service_started
clickhouse:
condition: service_healthy
clickhouse:
profiles:
- monitoring
image: clickhouse/clickhouse-server:latest
restart: unless-stopped
ports:
- "8123:8123" # HTTP interface
- "9001:9000" # Native protocol
volumes:
- ./clickhouse/initdb:/docker-entrypoint-initdb.d
- clickhouse-data:/var/lib/clickhouse
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: "password"
networks:
- laravel_net
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8123/ping | grep -q 'Ok'"]
interval: 5s
timeout: 3s
retries: 20
depends_on:
app:
condition: service_healthy
networks:
laravel_net:
driver: bridge
volumes:
pgsql-data:
driver: local
redis-data:
driver: local
meilisearch-data:
driver: local
kafka-data:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local
clickhouse-data:
driver: local