-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
94 lines (88 loc) · 2.11 KB
/
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
volumes:
catalog_data:
nats_data:
services:
nats:
image: nats:alpine
ports:
- "4222:4222"
command:
- "--jetstream"
- "--store_dir=/data/jetstream"
volumes:
- nats_data:/data/jetstream
healthcheck:
test: ["CMD-SHELL", "wget http://localhost:8222/healthz -q -S -O -"]
interval: 1s
timeout: 5s
retries: 5
api-gateway:
build: { args: { SERVICE: api_gateway } }
ports:
- "80:8080"
environment:
- NATS_URL=nats://nats:4222
- OTLP_URL=collector:4317
depends_on:
- nats
- collector
catalog:
build: { args: { SERVICE: catalog } }
environment:
- DB_URL=postgres://catalog:catalog@catalog-postgres:5432/catalog
- NATS_URL=nats://nats:4222
- OTLP_URL=collector:4317
depends_on:
- catalog-postgres
- nats
- collector
catalog-postgres:
image: postgres:alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=catalog
- POSTGRES_PASSWORD=catalog
volumes:
- ./srv/catalog/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- catalog_data:/var/lib/postgresql/data
order:
build: { args: { SERVICE: order } }
environment:
- NATS_URL=nats://nats:4222
- OTLP_URL=collector:4317
depends_on:
- nats
- collector
warehouse:
build: { args: { SERVICE: warehouse } }
environment:
- WAREHOUSE_ID=41
- NATS_URL=nats://nats:4222
- OTLP_URL=collector:4317
depends_on:
- nats
- collector
# Observability stack
collector:
image: otel/opentelemetry-collector-contrib
ports:
- "4317:4317"
volumes:
- ./containers/collector.yml:/etc/otelcol-contrib/config.yaml:ro
loki:
image: grafana/loki:3.3.1
prometheus:
image: prom/prometheus
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-otlp-receiver"
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- ./containers/grafana:/etc/grafana/provisioning/