-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·248 lines (234 loc) · 6.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·248 lines (234 loc) · 6.81 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
services:
nginx:
profiles: ["all", "nginx"]
image: nginx:${NGINX_VERSION:-1.27.1}
container_name: swirl_nginx
restart: always
ports:
- "80:80"
- "443:443"
environment:
SWIRL_FQDN: ${SWIRL_FQDN}
USE_CERT: ${USE_CERT:-false}
USE_NGINX: ${USE_NGINX:-false}
USE_TLS: ${USE_TLS:-false}
networks: ["swirl"]
volumes:
- ./nginx/nginx.template:/etc/nginx/nginx.template:ro
- ./nginx/docker-entrypoint.sh:/tmp/docker-entrypoint.sh
- ./certbot/conf/:/etc/letsencrypt/:ro
- ./certbot/www/:/var/www/certbot/:ro
- ./nginx/certificates/ssl/:/etc/nginx/ssl/:ro
entrypoint: ["/tmp/docker-entrypoint.sh"]
certbot:
profiles: ["all", "certbot"]
image: certbot/certbot:${CERTBOT_VERSION:-v2.11.0}
container_name: swirl_certbot
restart: always
volumes:
- ./certbot/conf/:/certbot/conf
- ./certbot/www/:/var/www/certbot
- ./certbot/run/:/var/run/certbot
- ./certbot/docker-entrypoint.sh:/tmp/docker-entrypoint.sh
- ./certbot/work/:/certbot/work
- ./certbot/logs/:/certbot/logs
entrypoint: ["/tmp/docker-entrypoint.sh"]
environment:
CERTBOT_EMAIL: ${CERTBOT_EMAIL}
SWIRL_FQDN: ${SWIRL_FQDN}
USE_CERT: ${USE_CERT:-false}
CERTBOT_RENEW_TEST: ${CERTBOT_RENEW_TEST:-false}
CERTBOT_RENEW_INTERVAL_SECONDS: ${CERTBOT_RENEW_INTERVAL_SECONDS:-43200}
CERTBOT_STAGING: ${CERTBOT_STAGING:-false}
healthcheck:
test: ["CMD", "grep", "-q", "healthy", "/etc/certbot/health"]
interval: 30s
timeout: 10s
retries: 5
networks: ["swirl"]
depends_on:
nginx:
condition: service_started
nginx_reloader:
profiles: ["all", "nginx", "certbot"]
image: alpine:3.20
container_name: swirl_nginx_reloader
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./certbot/run/:/var/run/certbot
- ./nginx/:/nginx
environment:
SWIRL_FQDN: ${SWIRL_FQDN}
entrypoint: ["/bin/sh", "/nginx/reloader.sh"]
depends_on:
nginx:
condition: service_started
postgres:
profiles: ["all", "db"]
image: postgres:${POSTGRES_VERSION:-16}
container_name: swirl_postgres
environment:
POSTGRES_USER: ${SQL_USER:-postgres}
POSTGRES_PASSWORD: ${SQL_PASSWORD:-postgres}
POSTGRES_DB: ${SQL_DATABASE:-swirl}
networks: ["swirl"]
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${SQL_USER:-postgres} -d ${SQL_DATABASE:-swirl}"]
interval: 10s
timeout: 5s
retries: 5
redis-broker:
profiles: ["all", "svc", "redis"]
image: redis:${REDIS_VERSION:-7}
container_name: swirl_redis_broker
networks: ["swirl"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
redis-cache:
profiles: ["all", "svc", "redis"]
image: redis:${REDIS_VERSION:-7}
container_name: swirl_redis_cache
networks: ["swirl"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
qdrant:
profiles: ["all", "svc", "qdrant"]
image: qdrant/qdrant:${QDRANT_VERSION:-v1.18.2}
container_name: swirl_qdrant
restart: always
networks: ["swirl"]
volumes:
- qdrant_data:/qdrant/storage
seaweedfs:
profiles: ["all", "svc", "seaweedfs"]
image: chrislusf/seaweedfs:${SEAWEEDFS_VERSION:-4.36}
container_name: swirl_seaweedfs
restart: always
command: ["server", "-dir=/data", "-s3", "-volume.max=0"]
networks: ["swirl"]
volumes:
- seaweed_data:/data
ollama:
profiles: ["all", "svc", "ollama"]
image: ${OLLAMA_PATH:-swirlai/release-ollama-enterprise}:${OLLAMA_VERSION:-0.30.10}
container_name: swirl_ollama
restart: always
networks: ["swirl"]
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
mcp:
profiles: [ "all", "mcp" ]
image: ${SWIRL_PATH}:${SWIRL_VERSION}
container_name: swirl_mcp
restart: always
env_file:
- .env
networks: [ "swirl" ]
command: ["python", "-m", "swirl_mcp", "--transport", "http", "--host", "0.0.0.0"]
environment:
SWIRL_MCP_BASE_URL: "http://swirl:${SWIRL_PORT:-8000}"
SWIRL_MCP_TOKEN: ${SWIRL_MCP_TOKEN:-}
ports:
- "${SWIRL_MCP_PORT:-8675}:8675"
healthcheck:
# The MCP endpoint answers non-protocol GETs with 4xx — any HTTP
# response at all means the server is up.
test: [ "CMD-SHELL", "curl -s -o /dev/null http://localhost:8675/mcp || exit 1" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
depends_on:
swirl:
condition: service_healthy
tika:
profiles: ["all", "svc", "tika"]
image: swirlai/release-tika-enterprise:${TIKA_VERSION}
container_name: swirl_tika
networks: ["swirl"]
swirl-job:
profiles: ["all", "setup"]
image: ${SWIRL_PATH}:${SWIRL_VERSION}
container_name: swirl_app_job
restart: "no"
env_file:
- .env
command: ["/bin/bash","/tmp/swirl-load-job.sh"]
volumes:
- ./scripts/swirl-load-job.sh:/tmp/swirl-load-job.sh
- ./:/host # <-- add this (repo root visible inside container)
networks: ["swirl"]
depends_on:
swirl:
condition: service_healthy
swirl-init:
profiles: ["all", "svc", "swirl"]
image: ${SWIRL_PATH}:${SWIRL_VERSION}
container_name: swirl_app_init
env_file:
- .env
networks: ["swirl"]
command: ["python", "swirl.py", "migrate", "-v"]
swirl:
profiles: ["all", "svc", "swirl"]
image: ${SWIRL_PATH}:${SWIRL_VERSION}
container_name: swirl_app
env_file:
- .env
ports:
- "${SWIRL_PORT:-8000}:${SWIRL_PORT:-8000}"
depends_on:
redis-broker:
condition: service_healthy
redis-cache:
condition: service_healthy
qdrant:
condition: service_started
seaweedfs:
condition: service_started
tika:
condition: service_started
ollama:
condition: service_started
swirl-init:
condition: service_completed_successfully
command: ["/bin/bash","/tmp/swirl-load.sh"]
volumes:
- ./nginx/nginx.template:/nginx/nginx.template
- ./scripts/swirl-load.sh:/tmp/swirl-load.sh
- ./uploads/:/app/uploads/
- ./logs:/app/logs
networks: ["swirl"]
healthcheck:
test: ["CMD-SHELL", "/app/swirl-health-check.sh || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
db_data:
driver: local
name: swirl_db_data
qdrant_data:
driver: local
name: swirl_qdrant_data
seaweed_data:
driver: local
name: swirl_seaweed_data
networks:
swirl:
driver: bridge
name: swirl_network