Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
69 lines (66 loc) · 1.49 KB
/
Copy pathcompose.yml
File metadata and controls
69 lines (66 loc) · 1.49 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
services:
postgres:
image: postgres:16
container_name: postgres
env_file: .env.postgres
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U storm -d stormdata"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
kafka:
image: apache/kafka:3.7.0
container_name: kafka
env_file: .env.kafka
ports:
- "29092:29092"
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list"]
interval: 10s
timeout: 10s
retries: 5
start_period: 30s
restart: unless-stopped
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
storm-data-api:
build: .
container_name: storm-data-api
ports:
- "8080:8080"
env_file: .env
healthcheck:
test: ["CMD", "/bin/busybox", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
depends_on:
postgres:
condition: service_healthy
kafka:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
volumes:
pgdata: