-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.44 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.44 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
name: typescript-service-starter
services:
api:
container_name: api
init: true
stop_signal: SIGINT
stop_grace_period: 30s
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_healthy
prometheus:
condition: service_healthy
jaeger:
condition: service_healthy
env_file:
- .env
- .env.local
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/typescript-service-starter
VALKEY_URL: valkey://valkey:6379
HTTP_ADDRESS: 0.0.0.0
HTTP_PORT: 3000
OTLP_TRACE_ENDPOINT: http://jaeger:4318
OTLP_METRICS_ENDPOINT: http://prometheus:9090
postgres:
container_name: postgres
image: postgres:17-alpine
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: typescript-service-starter
healthcheck:
test: pg_isready -U postgres
interval: 30s
timeout: 5s
start_period: 15s
start_interval: 5s
retries: 5
valkey:
container_name: valkey
image: valkey/valkey:8-alpine
ports:
- 6379:6379
healthcheck:
test: valkey-cli -h 127.0.0.1 -p 6379 ping
interval: 30s
timeout: 5s
start_period: 15s
start_interval: 5s
retries: 5
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --web.enable-otlp-receiver
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
healthcheck:
test: wget --spider http://localhost:9090/
interval: 30s
timeout: 5s
start_period: 15s
start_interval: 5s
retries: 3
jaeger:
image: jaegertracing/jaeger
container_name: jaeger
ports:
- 16686:16686 # web ui
- 4317:4317 # accept OpenTelemetry Protocol (OTLP) over gRPC
- 4318:4318 # accept OpenTelemetry Protocol (OTLP) over HTTP
- 5778:5778 # serve configs, sampling strategies
- 9411:9411 # can accept Zipkin spans in JSON or Thrift (disabled by default)
environment:
COLLECTOR_ZIPKIN_HTTP_PORT: 9411
healthcheck:
test: wget --spider http://localhost:16686/
interval: 30s
timeout: 5s
start_period: 15s
start_interval: 5s
retries: 3