-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
123 lines (104 loc) · 2.7 KB
/
docker-compose.yaml
File metadata and controls
123 lines (104 loc) · 2.7 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
x-shared-env: &shared-env
PYTHONUNBUFFERED: 1
PYTHON_ENV: development
UV_NO_DEV: 0
LOG_LEVEL: DEBUG
GOOGLE_APPLICATION_CREDENTIALS: /secret/cfg/service_account.json
SHA: DEV
MODAL_CONFIG_PATH: /secret/.modal.toml
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
OTEL_SERVICE_NAME: olmo-api
services:
db:
image: postgres:15
ports:
- 5555:5432
environment:
POSTGRES_PASSWORD: llmz
POSTGRES_DB: llmx
command:
- postgres
- -c
- log_statement=all
- -c
- log_destination=stderr
volumes:
- pgdata:/var/lib/postgresql/data
- ./schema:/docker-entrypoint-initdb.d
api:
build:
context: .
dockerfile: apps/api/Dockerfile
target: dev
volumes:
- ./service_account.json:/secret/cfg/service_account.json
- ./.modal.toml:/secret/.modal.toml
environment:
<<: *shared-env
DATABASE_URL: "postgres://app:llmz@db:5432/llmx?sslmode=disable"
OTEL_COLLECTOR_TYPE: "local"
SAFETY_QUEUE_URL: "redis://redis:6379"
ENV: development
ports:
- 8888:8888
develop:
watch:
# Sync the working directory with the `/app` directory in the container
- action: sync
path: .
target: /app
# Exclude the project virtual environment — it could be for a
# different platform in the container
ignore:
- apps/db-migrations/
- apps/safety-worker/
# Rebuild the image if dependencies change by checking uv.lock
- action: rebuild
path: ./uv.lock
- action: restart
path: ./config.json
safety-worker:
build:
dockerfile: apps/api-safety-worker/api-safety-worker.Dockerfile
context: .
target: dev
volumes:
- ./service_account.json:/secret/cfg/service_account.json
environment:
<<: *shared-env
DATABASE_URL: "postgres://app:llmz@db:5432/llmx?sslmode=disable"
SAFETY_QUEUE_URL: "redis://redis:6379"
ENV: development
develop:
watch:
- action: sync
path: .
target: /app
ignore:
- .venv/
- apps/api/
- apps/api-safety-worker/
- action: rebuild
path: ./uv.lock
ports:
- 9192:9191
depends_on:
redis:
condition: service_started
redis:
image: redis:7
ports:
- 6379:6379
command: --loglevel debug
jaeger:
image: cr.jaegertracing.io/jaegertracing/jaeger:2.15.1
ports:
- 55679:55679
- 4317:4317
- 4318:4318
- 16686:16686
- 14250:14250
environment:
- COLLECTOR_OTLP_ENABLED=true
volumes:
pgdata: