Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (83 loc) · 2.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (83 loc) · 2.04 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
services:
redis:
image: redis:7-alpine
container_name: mcpilot-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
postgres:
image: postgres:17-alpine
container_name: mcpilot-postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=abc123
- POSTGRES_DB=mcpilot
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 3
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mcpilot-backend
ports:
- "8000:8000"
volumes:
- ./backend/configs:/app/configs
- ./backend/logs:/app/logs
environment:
- SERVER__TOKEN=your-secret-token-here
- SERVER__DEBUG=false
- LOGGING__LEVEL=INFO
- AUTH__ENABLED=true
- AUTH__JWT_SECRET=change-this-to-a-secure-secret-in-production
- AUTH__BOOTSTRAP_ADMIN_PASSWORD=change-this-in-production
- REDIS__ENABLED=true
- REDIS__URL=redis://redis:6379/0
- DATABASE__URL=postgresql+asyncpg://postgres:abc123@postgres:5432/mcpilot
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2.0'
memory: 512M
reservations:
memory: 128M
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mcpilot-frontend
ports:
- "3000:80"
depends_on:
- backend
restart: unless-stopped
volumes:
redis_data:
postgres_data: