Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 2.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (72 loc) · 2.05 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
services:
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
restart: unless-stopped
producer:
build:
context: .
dockerfile: Dockerfile.producer
environment:
REDIS_URL: redis://redis:6379/0
PORT_PRODUCER: "8080"
OTEL_TRACING_ENABLED: "${OTEL_TRACING_ENABLED:-false}"
OTEL_SERVICE_NAME: taskforge-producer
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-}"
OTEL_EXPORTER_OTLP_INSECURE: "${OTEL_EXPORTER_OTLP_INSECURE:-true}"
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:8080/ready >/dev/null 2>&1"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped
worker:
build:
context: .
dockerfile: Dockerfile.worker
environment:
REDIS_URL: redis://redis:6379/0
PORT_WORKER: "8081"
WORKER_COUNT: "${WORKER_COUNT:-4}"
TASK_VISIBILITY_TIMEOUT: "${TASK_VISIBILITY_TIMEOUT:-30s}"
TASK_RETRY_BASE_DELAY: "${TASK_RETRY_BASE_DELAY:-2s}"
OTEL_TRACING_ENABLED: "${OTEL_TRACING_ENABLED:-false}"
OTEL_SERVICE_NAME: taskforge-worker
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-}"
OTEL_EXPORTER_OTLP_INSECURE: "${OTEL_EXPORTER_OTLP_INSECURE:-true}"
ports:
- "8081:8081"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:8081/ready >/dev/null 2>&1"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped
jaeger:
image: jaegertracing/all-in-one:1.62
profiles: ["tracing"]
environment:
COLLECTOR_OTLP_ENABLED: "true"
ports:
- "16686:16686"
- "4317:4317"
volumes:
redis-data: