-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (96 loc) · 2.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
102 lines (96 loc) · 2.39 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
# Legate Agent — development stack.
# `docker compose up` starts every backing service plus the API, worker, and web.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: legate
POSTGRES_PASSWORD: legate
POSTGRES_DB: legate
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U legate"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
volumes:
- qdrant_data:/qdrant/storage
healthcheck:
test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/6333' || exit 1"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: ./apps/api
command: uvicorn legate.main:app --host 0.0.0.0 --port 8000 --reload
env_file:
- .env
environment:
DATABASE_URL: postgresql+psycopg://legate:legate@postgres:5432/legate
REDIS_URL: redis://redis:6379/0
QDRANT_URL: http://qdrant:6333
ports:
- "8000:8000"
volumes:
- ./apps/api:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
worker:
build:
context: ./apps/api
command: celery -A legate.workers.celery_app worker --loglevel=info
# The shared image ships an HTTP healthcheck for the API; the worker has no
# web server, so disable it here (Celery liveness is not HTTP-probed).
healthcheck:
disable: true
env_file:
- .env
environment:
DATABASE_URL: postgresql+psycopg://legate:legate@postgres:5432/legate
REDIS_URL: redis://redis:6379/0
QDRANT_URL: http://qdrant:6333
volumes:
- ./apps/api:/app
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
web:
build:
context: ./apps/web
command: npm run dev
environment:
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
ports:
- "3000:3000"
volumes:
- ./apps/web:/app
- /app/node_modules
depends_on:
- api
volumes:
postgres_data:
qdrant_data: