-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.75 KB
/
docker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.75 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
services:
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
bvg:
build: .
restart: unless-stopped
ports:
- "3000"
environment:
- HAFAS_PROFILE=bvg
- REDIS_URL=redis://redis:6379
# OTLP export (optional). If unset, observability stays disabled.
- OTLP_ENDPOINT=${OTLP_ENDPOINT:-}
- OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
- OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS:-}
- OBSERVABILITY_ENABLED=${OBSERVABILITY_ENABLED:-true}
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-esptransit-server}
- OTEL_SERVICE_NAMESPACE=${OTEL_SERVICE_NAMESPACE:-}
- OTEL_DEPLOYMENT_ENVIRONMENT=${OTEL_DEPLOYMENT_ENVIRONMENT:-production}
- OTEL_EXPORT_INTERVAL_MS=${OTEL_EXPORT_INTERVAL_MS:-15000}
- OTEL_EXPORT_TIMEOUT_MS=${OTEL_EXPORT_TIMEOUT_MS:-10000}
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"]
interval: 30s
timeout: 5s
retries: 3
# Add more profiles by duplicating the bvg service block:
# db:
# build: .
# restart: unless-stopped
# ports:
# - "3000"
# environment:
# - HAFAS_PROFILE=db
# - REDIS_URL=redis://redis:6379
# depends_on:
# redis:
# condition: service_healthy
# healthcheck:
# test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"]
# interval: 30s
# timeout: 5s
# retries: 3
volumes:
redis-data: