-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.override.yml
More file actions
117 lines (113 loc) · 2.84 KB
/
docker-compose.override.yml
File metadata and controls
117 lines (113 loc) · 2.84 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
services:
django:
build:
context: .
dockerfile: ./dev/django.Dockerfile
command: [
"./manage.py",
"runserver", "0.0.0.0:8000"
]
# Log printing is enhanced by a TTY
tty: true
environment:
UV_ENV_FILE: ./dev/.env.docker-compose
working_dir: /opt/django-project
volumes:
- .:/opt/django-project
- uv_cache:/var/cache/uv
ports:
- 8000:8000
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
# Default celery worker (CPU-only, runs by default)
celery:
build:
context: .
dockerfile: ./dev/django.Dockerfile
command: [
"uv", "run",
"--extra", "tasks",
"celery",
"--app", "uvdat.celery",
"worker",
"--loglevel", "INFO",
"--without-heartbeat"
]
# Docker Compose does not set the TTY width, which causes Celery errors
tty: false
environment:
UV_ENV_FILE: ./dev/.env.docker-compose
working_dir: /opt/django-project
volumes:
- .:/opt/django-project
- uv_cache:/var/cache/uv
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
# GPU-enabled celery worker for accelerated inferencing
# Use with: docker compose --profile gpu up --scale celery=0
celery-gpu:
build:
context: .
dockerfile: ./dev/django.Dockerfile
command: [
"uv", "run",
"--extra", "tasks",
"celery",
"--app", "uvdat.celery",
"worker",
"--loglevel", "INFO",
"--without-heartbeat"
]
# Docker Compose does not set the TTY width, which causes Celery errors
tty: false
environment:
UV_ENV_FILE: ./dev/.env.docker-compose
working_dir: /opt/django-project
volumes:
- .:/opt/django-project
- uv_cache:/var/cache/uv
shm_size: 1gb
profiles: ["gpu"] # Only runs with --profile gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
web:
image: node:24.14.0
command: ["sh", "-c", "npm install && npm run serve -- --host 0.0.0.0"]
working_dir: /web
volumes:
- ./web:/web
- ./.git:/web/.git # allow fetching version tag
- web_node_modules:/web/node_modules # Keep container's node_modules separate from host
ports:
- 8080:8080
volumes:
uv_cache:
web_node_modules: