-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (81 loc) · 2.1 KB
/
docker-compose.yml
File metadata and controls
88 lines (81 loc) · 2.1 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
x-backend-common: &backend-common
env_file:
- .env
environment: &backend-env
REDIS_URL: redis://redis:6379/0
COMIC_RAR_TOOLS_DIR: /app/.tools
DB_POOL_MODE: "null"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- upload_tmp:/tmp/onedrive_uploads
restart: unless-stopped
x-backend-runtime-depends: &backend-runtime-depends
migrate:
condition: service_completed_successfully
redis:
condition: service_healthy
services:
migrate:
<<: *backend-common
image: driver-backend:local
build:
context: ./src
dockerfile: backend/Dockerfile
target: backend-runtime
container_name: driver-migrate
command: uv run --no-sync alembic -c src/alembic.ini upgrade head
restart: "no"
backend:
<<: *backend-common
image: driver-backend:local
build:
context: ./src
dockerfile: backend/Dockerfile
target: backend-runtime
container_name: driver-backend
command: uv run --no-sync uvicorn backend.main:app --host 0.0.0.0 --port 8000
depends_on: *backend-runtime-depends
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/health"]
interval: 10s
timeout: 3s
retries: 10
start_period: 20s
ports:
- "8000:8000"
worker:
<<: *backend-common
image: driver-backend:local
container_name: driver-worker
environment:
<<: *backend-env
WORKER_QUEUE_NAME: driver:jobs
WORKER_CONCURRENCY: 6
command: uv run --no-sync arq backend.workers.arq_worker.WorkerSettings
depends_on: *backend-runtime-depends
redis:
image: redis:7-alpine
container_name: driver-redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
frontend:
image: driver-frontend:local
build:
context: ./src/frontend
dockerfile: Dockerfile
container_name: driver-frontend
depends_on:
backend:
condition: service_healthy
ports:
- "5173:80"
restart: unless-stopped
volumes:
upload_tmp: