-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.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
version: '3.8'
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: contractiq
POSTGRES_PASSWORD: contractiq_dev
POSTGRES_DB: contractiq
ports:
- "5435:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U contractiq"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
ports:
- "6380:6379" # Host port 6380 maps to container port 6379
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
command: redis-server --appendonly yes
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8002:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql://contractiq:contractiq_dev@db:5432/contractiq
REDIS_URL: redis://redis:6379/0
ENVIRONMENT: development
volumes:
- ./backend:/app
- backend_uploads:/app/uploads
- backend_chroma:/app/chroma_db
- ./assets:/app/assets
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
postgres_data:
backend_uploads:
backend_chroma:
redis_data: