-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (49 loc) · 1.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (49 loc) · 1.17 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
services:
app:
build: .
ports:
- 8000:8000
environment:
DATABASE_URL: postgresql+psycopg2://user:password@postgres:5432/mydatabase
OTEL_SERVICE_NAME: flask-app
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://jaeger:4318/v1/traces
OTEL_TRACES_SAMPLER: traceidratio
OTEL_TRACES_SAMPLER_ARG: "0.05"
command: ["gunicorn", "-b", "0.0.0.0:8000", "-w", "4", "app:app"]
volumes:
- ./:/app
depends_on:
- postgres
- rabbitmq
restart: on-failure
cap_add:
- SYS_PTRACE
worker:
build: .
environment:
OTEL_SERVICE_NAME: worker
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://jaeger:4318/v1/traces
command: ["python", "worker.py"]
volumes:
- ./:/app
depends_on:
- rabbitmq
restart: on-failure
postgres:
image: postgres:18
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mydatabase
volumes:
- pg_data:/var/lib/postgresql
rabbitmq:
image: rabbitmq:4.2.1
jaeger:
image: jaegertracing/jaeger:2.12.0
ports:
- 16686:16686
environment:
COLLECTOR_OTLP_ENABLED: true
volumes:
pg_data: