-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathdocker-compose.yml
79 lines (73 loc) · 2.04 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
volumes:
postgres: {}
services:
postgres:
image: "postgres:16-alpine"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ledger"]
interval: 10s
timeout: 5s
retries: 5
command:
- -c
- max_connections=200
- -c
- log_min_messages=info
environment:
POSTGRES_USER: "ledger"
POSTGRES_PASSWORD: "ledger"
POSTGRES_DB: "ledger"
PGDATA: /data/postgres
volumes:
- ${POSTGRES_DATA:-postgres}:/data/postgres
prometheus:
image: prom/prometheus:latest
restart: always
volumes:
- ./deployments/docker-compose/prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
otel:
image: "otel/opentelemetry-collector-contrib:0.81.0"
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- ./deployments/docker-compose/otel-collector-config.yaml:/etc/otel-collector-config.yaml
jaeger:
image: jaegertracing/opentelemetry-all-in-one
ports:
- "16686:16686/tcp"
ledger:
image: golang:1.23-alpine
entrypoint: go run main.go serve
volumes:
- .:/src
- ${GOPATH}:/go
ports:
- 3068:3068
working_dir: /src
depends_on:
postgres:
condition: service_healthy
jaeger:
condition: service_started
otel:
condition: service_started
environment:
GOWORK: off
DEBUG: "${DEBUG:-false}"
OTEL_SERVICE_NAME: ledger
OTEL_METRICS_EXPORTER: "otlp"
OTEL_METRICS_EXPORTER_OTLP_ENDPOINT: otel:4317
OTEL_METRICS_EXPORTER_OTLP_INSECURE: "true"
OTEL_METRICS_KEEP_IN_MEMORY: "true"
OTEL_TRACES_EXPORTER: otlp
OTEL_TRACES_EXPORTER_OTLP_ENDPOINT: otel:4317
OTEL_TRACES_EXPORTER_OTLP_INSECURE: "true"
OTEL_TRACES_BATCH: "true"
POSTGRES_URI: "postgresql://ledger:ledger@postgres/ledger?sslmode=disable"
POSTGRES_MAX_OPEN_CONNS: "40"
POSTGRES_MAX_IDLE_CONNS: "40"
POSTGRES_CONN_MAX_IDLE_TIME: "5m"
EXPERIMENTAL_FEATURES: "true"
AUTO_UPGRADE: "true"
BULK_PARALLEL: "10"