-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.36 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
services:
db:
image: pgvector/pgvector:pg16
container_name: docuquery_db
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${DB_PORT}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: docuquery_redis
ports:
- "${REDIS_PORT}:6379"
api:
build: .
container_name: docuquery_api
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
- .:/app
ports:
- "8000:8000"
environment:
- DB_HOST=db
- REDIS_HOST=redis
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- API_KEY=${API_KEY}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
worker:
build: .
container_name: docuquery_worker
command: celery -A app.worker.celery worker --loglevel=info
volumes:
- .:/app
environment:
- DB_HOST=db
- REDIS_HOST=redis
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- API_KEY=${API_KEY}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
postgres_data: