forked from Mng-dev-ai/agentrove
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
119 lines (112 loc) · 3.37 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
119 lines (112 loc) · 3.37 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Production Docker Compose for Hostinger/VPS deployment
# Usage: docker compose -f docker-compose.prod.yml up -d
services:
postgres:
image: postgres:13
container_name: claudex-postgres
restart: always
command: -c max_connections=600
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: claudex-redis
restart: always
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
image: ghcr.io/array-ventures/claudex-api:latest
pull_policy: always
container_name: claudex-api
restart: unless-stopped
command: ["api"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "${BACKEND_PORT:-8080}:8080"
volumes:
- storage_data:/app/storage
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-postgres}
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=${SECRET_KEY}
- PYTHONUNBUFFERED=1
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- ENVIRONMENT=production
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:3000}
celery-worker:
image: ghcr.io/array-ventures/claudex-api:latest
pull_policy: always
restart: unless-stopped
command: ["celery-worker"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-postgres}
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=${SECRET_KEY}
- PYTHONUNBUFFERED=1
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- CELERY_CONCURRENCY=${CELERY_CONCURRENCY:-25}
- ENVIRONMENT=production
deploy:
replicas: ${CELERY_WORKER_REPLICAS:-4}
celery-beat:
image: ghcr.io/array-ventures/claudex-api:latest
pull_policy: always
container_name: claudex-celery-beat
restart: unless-stopped
command: ["celery-beat"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-postgres}
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=${SECRET_KEY}
- PYTHONUNBUFFERED=1
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- ENVIRONMENT=production
frontend:
image: ghcr.io/array-ventures/claudex-frontend:latest
pull_policy: always
container_name: claudex-frontend
restart: unless-stopped
depends_on:
- api
ports:
- "${FRONTEND_PORT:-3000}:3000"
# Note: VITE_API_BASE_URL and VITE_WS_URL are baked in at build time
volumes:
postgres_data:
driver: local
redis_data:
driver: local
storage_data:
driver: local