-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (92 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
98 lines (92 loc) · 2.5 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
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: bugninja-postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: bugninja
POSTGRES_USER: bugninja_user
POSTGRES_PASSWORD: bugninja_password
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U bugninja_user -d bugninja"]
interval: 30s
timeout: 10s
retries: 5
# Redis for queuing and real-time communication
redis:
image: redis:7-alpine
container_name: bugninja-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
- ./infrastructure/docker/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 5
# FastAPI Backend
backend:
build:
context: .
dockerfile: infrastructure/docker/backend.Dockerfile
args:
- GIT_TOKEN=${GIT_TOKEN}
container_name: bugninja-backend
restart: unless-stopped
ports:
- "8000:8000"
volumes:
# Only mount specific directories for development, not the entire backend
- ./backend/app:/app/app
- ./backend/dev:/app/dev
- ./backend/content:/app/content:rw
- ./backend/screenshots:/app/screenshots:rw
environment:
- DATABASE_URL=postgresql+psycopg2://bugninja_user:bugninja_password@postgres:5432/bugninja
- REDIS_URL=redis://redis:6379
- API_DEBUG=true
- API_CORS_ORIGINS=["http://localhost:3000"]
- AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}
- AZURE_OPENAI_KEY=${AZURE_OPENAI_KEY}
- GIT_TOKEN=${GIT_TOKEN}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Frontend React Application
frontend:
build:
context: ./frontend
dockerfile: ../infrastructure/docker/frontend.Dockerfile
container_name: bugninja-frontend
restart: unless-stopped
ports:
- "3000:3000"
volumes:
# Mount node_modules from host to avoid linter issues
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
stdin_open: true
tty: true
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
default:
name: bugninja-network