-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
225 lines (208 loc) · 5.2 KB
/
docker-compose.yml
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
x-n8n: &service-n8n
image: n8nio/n8n:latest
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_USER=${POSTGRES_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_PERSONALIZATION_ENABLED=false
- WEBHOOK_URL=https://n8n.crypto-tech.cloud
- N8N_ENCRYPTION_KEY
- N8N_USER_MANAGEMENT_JWT_SECRET
- N8N_SECURE_COOKIE
- NODE_FUNCTION_ALLOW_BUILTIN=*
- NODE_FUNCTION_ALLOW_EXTERNAL=*
links:
- postgres
x-logging: &logging
logging:
driver: 'json-file'
options:
max-size: 100m
max-file: '2'
services:
localai:
container_name: localai
hostname: localai
image: localai/localai:latest-gpu-nvidia-cuda-12
restart: unless-stopped
# ports:
# - 8080:8080
environment:
- MODELS_PATH=/models
- TOKEN=your-token-here
- FEDERATED=true
- LOCALAI_P2P=true
- LOCALAI_PARALLEL_REQUESTS=true
# - DEBUG=true
volumes:
- ./models:/models:cached
- ./images/:/tmp/generated/images/
network_mode: host # couldn't get p2p to work without this.
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['1','2','3']
capabilities: [gpu]
<<: *logging
llm-proxy:
container_name: llm-proxy
hostname: llm-proxy
image: ghcr.io/j4ys0n/llm-proxy:1.4.7
restart: unless-stopped
ports:
- 3001:3001
env_file:
- ./.llm-proxy.env
volumes:
- ./.llm-proxy.env:/usr/src/app/.env
<<: *logging
# open webui start
webui:
container_name: webui
hostname: webui
image: ghcr.io/open-webui/open-webui:main
restart: unless-stopped
ports:
- 3000:3000
environment:
- PORT=3000
- OPENAI_API_BASE=http://llm-proxy:8080/v1
volumes:
- ./open-webui:/app/backend/data
<<: *logging
redis:
container_name: redis
hostname: redis
image: docker.io/valkey/valkey:8-bookworm
restart: unless-stopped
command: valkey-server --save 30 1 --loglevel warning
volumes:
- ./valkey-data:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
<<: *logging
searxng:
container_name: searxng
hostname: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- 8081:8080
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
volumes:
- ./searxng:/etc/searxng:rw
<<: *logging
# open webui end
# comfyui start
stable-diffusion-download:
container_name: stable-diffusion-download
build: ./stable-diffusion-webui-docker/services/download/
image: comfy-download
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
volumes:
- ./stable-diffusion-webui-docker/data:/data
<<: *logging
comfy-ui:
container_name: comfy-ui
hostname: comfy-ui
build: ./stable-diffusion-webui-docker/services/comfy/
image: comfy-ui
restart: unless-stopped
ports:
- 7860:7860
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- CLI_ARGS=
volumes:
- ./stable-diffusion-webui-docker/data:/data
- ./stable-diffusion-webui-docker/output:/output
stop_signal: SIGKILL
tty: true
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [compute, utility]
<<: *logging
# comfyui end
# n8n start
postgres:
container_name: postgres
hostname: postgres
image: postgres:16-alpine
restart: unless-stopped
ports:
- 5432:5432
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
<<: *logging
qdrant:
container_name: qdrant
hostname: qdrant
image: qdrant/qdrant
restart: unless-stopped
ports:
- 6333:6333
volumes:
- ./qdrant:/qdrant/storage
<<: *logging
n8n-import:
<<: [*service-n8n, *logging]
container_name: n8n-import
entrypoint: /bin/sh
command:
- "-c"
- "n8n import:credentials --separate --input=/backup/credentials && n8n import:workflow --separate --input=/backup/workflows"
volumes:
- ./n8n/backup:/backup
depends_on:
postgres:
condition: service_healthy
n8n:
<<: [*service-n8n, *logging]
container_name: n8n
hostname: n8n
restart: unless-stopped
ports:
- 5678:5678
volumes:
- ./n8n/data:/home/node/.n8n
- ./n8n/backup:/backup
- ./shared:/data/shared # this is only if you want to be able to do anything with local files
depends_on:
postgres:
condition: service_healthy
n8n-import:
condition: service_completed_successfully
# n8n end