-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yaml
More file actions
70 lines (65 loc) · 1.61 KB
/
Copy pathdocker-compose-prod.yaml
File metadata and controls
70 lines (65 loc) · 1.61 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
services:
# 1. Backend API
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: purrvision_backend
restart: always
ports:
- "8000:8000"
volumes:
# CRITICAL: Share Host Kubeconfig so container can talk to Kind
- ~/.kube/config:/root/.kube/config:ro
# Allow access to charts for hot-reloading if needed
- ./charts:/app/charts
environment:
- REDIS_URL=redis://redis:6379/0
- DATABASE_URL=postgresql://purrvision:purrvision_pass@db:5432/purrvision
depends_on:
- db
- redis
# 2. Worker (Celery)
worker:
build:
context: .
dockerfile: Dockerfile.backend
container_name: purrvision_worker
restart: always
command: celery -A app.worker.celery_app worker --loglevel=info
volumes:
- ~/.kube/config:/root/.kube/config:ro
- ./charts:/app/charts
environment:
- REDIS_URL=redis://redis:6379/0
- DATABASE_URL=postgresql://purrvision:purrvision_pass@db:5432/purrvision
depends_on:
- backend
- redis
# 3. Frontend (React)
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
container_name: purrvision_frontend
restart: always
ports:
- "80:80"
depends_on:
- backend
# 4. Database
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: purrvision
POSTGRES_PASSWORD: purrvision_pass
POSTGRES_DB: purrvision
volumes:
- postgres_data:/var/lib/postgresql/data
# 5. Redis
redis:
image: redis:7-alpine
restart: always
volumes:
postgres_data: