-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
177 lines (169 loc) · 4.95 KB
/
docker-compose.yml
File metadata and controls
177 lines (169 loc) · 4.95 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
services:
postgres:
image: postgres:16-alpine
container_name: xgen-postgres
environment:
POSTGRES_USER: xgen
POSTGRES_PASSWORD: xgen1234
POSTGRES_DB: xgen_agent
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U xgen -d xgen_agent"]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:8.0-alpine
container_name: xgen-redis
command: redis-server --requirepass xgen1234 --maxmemory 128mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--no-auth-warning", "-a", "xgen1234", "ping"]
interval: 5s
timeout: 3s
retries: 5
xgen-core:
build:
context: ./repos/xgen-core
dockerfile_inline: |
FROM python:3.14-slim
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends git libpq-dev build-essential curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml .
RUN pip install --no-cache-dir .
COPY . .
EXPOSE 8000
CMD ["python", "main.py"]
container_name: xgen-core
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
POSTGRES_DB: xgen_agent
POSTGRES_USER: xgen
POSTGRES_PASSWORD: xgen1234
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_PASSWORD: xgen1234
AUTO_MIGRATION: "true"
APP_HOST: "0.0.0.0"
APP_PORT: "8000"
LOG_LEVEL: INFO
ports:
- "8001:8000"
healthcheck:
test: ["CMD-SHELL", "python -c \"import httpx; httpx.get('http://localhost:8000/health').raise_for_status()\" 2>/dev/null || curl -sf http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
qdrant:
image: qdrant/qdrant:latest
container_name: xgen-qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:6333/healthz || exit 1"]
interval: 5s
timeout: 3s
retries: 5
minio:
image: minio/minio:latest
container_name: xgen-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live || exit 1"]
interval: 5s
timeout: 3s
retries: 5
xgen-documents:
build:
context: ./repos/xgen-documents
dockerfile_inline: |
FROM python:3.14-slim
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends git libpq-dev build-essential curl tesseract-ocr poppler-utils libmagic1 && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml .
RUN pip install --no-cache-dir .
COPY . .
EXPOSE 8000
CMD ["python", "main.py"]
container_name: xgen-documents
depends_on:
xgen-core:
condition: service_healthy
qdrant:
condition: service_healthy
minio:
condition: service_healthy
environment:
CORE_SERVICE_BASE_URL: "http://xgen-core:8000"
XGEN_INTERNAL_API_KEY: "xgen-internal-key-2024"
APP_HOST: "0.0.0.0"
APP_PORT: "8000"
LOG_LEVEL: INFO
ports:
- "8002:8000"
healthcheck:
test: ["CMD-SHELL", "python -c \"import httpx; httpx.get('http://localhost:8000/health').raise_for_status()\" 2>/dev/null || curl -sf http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
xgen-agent:
build: .
container_name: xgen-agent
depends_on:
postgres:
condition: service_healthy
xgen-core:
condition: service_healthy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
DATABASE_URL: "postgresql://xgen:xgen1234@postgres:5432/xgen_agent"
MODEL_BASE_URL: "https://api.openai.com/v1"
MODEL_API_KEY: "${MODEL_API_KEY}"
MODEL_NAME: "gpt-4o-mini"
CORE_SERVICE_BASE_URL: "http://xgen-core:8000"
DOCUMENTS_SERVICE_BASE_URL: "http://xgen-documents:8000"
MCP_STATION_BASE_URL: "http://xgen-mcp-station:8000"
XGEN_INTERNAL_API_KEY: "xgen-internal-key-2024"
ports:
- "8010:8000"
xgen-agent-frontend:
build: ./frontend
container_name: xgen-agent-frontend
depends_on:
- xgen-agent
environment:
BACKEND_URL: "http://xgen-agent:8000"
ports:
- "3000:3000"
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
volumes:
pgdata:
qdrant_data:
minio_data: