-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
98 lines (92 loc) · 1.88 KB
/
docker-compose.yaml
File metadata and controls
98 lines (92 loc) · 1.88 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
services:
otel-collector:
image: otel/opentelemetry-collector-contrib
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
redis:
image: redis
dramatiq-worker:
build:
dockerfile: Dockerfile
context: .
target: dramatiq_app
env_file: local.env
environment:
OTEL_SERVICE_NAME: "bootstrap-fastapi-dramatiq-worker"
working_dir: "/app/src"
volumes:
- '.:/app'
depends_on:
- redis
- otel-collector
command:
- opentelemetry-instrument
- dramatiq
- --watch
- .
- -p
- "1"
- -t
- "1"
- dramatiq_worker
dev:
build:
dockerfile: Dockerfile
context: .
target: dev
env_file: local.env
environment:
OTEL_SERVICE_NAME: "bootstrap-fastapi-dev"
ports:
- '8000:8000'
working_dir: "/app/src"
volumes:
- '.:/app'
depends_on:
- redis
- otel-collector
command:
- opentelemetry-instrument
- uvicorn
- http_app:create_app
- --host
- 0.0.0.0
- --port
- "8000"
- --factory
# Remember to disable the reloader in order to allow otel instrumentation
- --reload
http:
build:
dockerfile: Dockerfile
context: .
target: http_app
depends_on:
- redis
- otel-collector
env_file: local.env
environment:
OTEL_SERVICE_NAME: "bootstrap-fastapi-http"
ports:
- '8001:8000'
volumes:
- './sqlite.db:/app/sqlite.db'
# Starting from here there are only single-run commands, we can use `make` here
test:
build:
dockerfile: Dockerfile
context: .
target: dev
volumes:
- '.:/app'
command:
- "make"
- "test"
ci-test:
build:
dockerfile: Dockerfile
context: .
target: dev
command:
- "make"
- "ci-test"