Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (62 loc) · 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (62 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: engagepulse
POSTGRES_PASSWORD: engagepulse
POSTGRES_DB: engagepulse
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U engagepulse -d engagepulse"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- pgdata:/var/lib/postgresql/data
redpanda:
image: redpandadata/redpanda:v24.2.4
command:
- redpanda
- start
- --overprovisioned
- --smp
- "1"
- --memory
- 512M
- --reserve-memory
- 0M
- --node-id
- "0"
- --kafka-addr
- internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr
- internal://redpanda:9092,external://localhost:19092
- --set
- redpanda.auto_create_topics_enabled=true
ports:
- "19092:19092"
healthcheck:
test: ["CMD-SHELL", "rpk cluster health | grep -q 'Healthy'"]
interval: 10s
timeout: 10s
retries: 10
engagepulse:
build: .
depends_on:
postgres:
condition: service_healthy
redpanda:
condition: service_started
environment:
HTTP_ADDR: ":8080"
GRPC_ADDR: ":9090"
DATABASE_URL: postgres://engagepulse:engagepulse@postgres:5432/engagepulse?sslmode=disable
KAFKA_BROKERS: redpanda:9092
KAFKA_TOPIC: player.events
LOG_LEVEL: info
ports:
- "8080:8080"
- "9090:9090"
volumes:
pgdata: