-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (149 loc) · 3.4 KB
/
docker-compose.yml
File metadata and controls
161 lines (149 loc) · 3.4 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
version: "3.8"
x-n8n: &service-n8n
image: n8nio/n8n:latest
networks: ['net']
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
- N8N_ENCRYPTION_KEY
- N8N_USER_MANAGEMENT_JWT_SECRET
- OLLAMA_HOST=${OLLAMA_HOST:-llm:11434}
env_file:
- path: .env
required: true
services:
llm:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
command: ["serve"]
networks:
- net
pull-model:
image: genai-stack/pull-model:latest
build:
context: .
dockerfile: pull_model.Dockerfile
env_file:
- .env
environment:
- OLLAMA_BASE_URL=http://llm:11434
- LLM=${LLM}
networks:
- net
depends_on:
- llm
tty: true
api:
build:
context: .
dockerfile: api.Dockerfile
environment:
- OLLAMA_BASE_URL=http://llm:11434
- LLM=${LLM}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- EMBEDDING_MODEL=${EMBEDDING_MODEL}
- LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
volumes:
- .:/app
networks:
- net
depends_on:
- pull-model
ports:
- "8504:8504"
telegram_bot:
build:
context: ./telegram_bot
dockerfile: telegram_bot.Dockerfile
env_file:
- .env
environment:
- OLLAMA_BASE_URL=http://llm:11434
- LLM=${LLM}
- CHANNEL_ID=${CHANNEL_ID}
- ADMIN_ID=${ADMIN_ID}
- TOKEN=${TOKEN}
volumes:
- ./telegram_bot:/app
networks:
- net
ports:
- "8506:8506"
depends_on:
- pull-model
postgres:
image: postgres:16-alpine
hostname: postgres
networks: ['net']
restart: unless-stopped
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U $${POSTGRES_USER} -d $${POSTGRES_DB} || exit 1']
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
n8n-import:
<<: *service-n8n
hostname: n8n-import
container_name: n8n-import
entrypoint: /bin/sh
command:
- "-c"
- "n8n import:credentials --separate --input=/net-data/credentials && n8n import:workflow --separate --input=/net-data/workflows"
volumes:
- ./n8n/demo-data:/net-data
depends_on:
postgres:
condition: service_healthy
n8n:
<<: *service-n8n
hostname: n8n
container_name: n8n
restart: unless-stopped
ports:
- 5678:5678
volumes:
- n8n_storage:/home/node/.n8n
- ./n8n/demo-data:/net-data
- ./shared:/data/shared
depends_on:
postgres:
condition: service_healthy
n8n-import:
condition: service_completed_successfully
qdrant:
image: qdrant/qdrant
hostname: qdrant
container_name: qdrant
networks: ['net']
restart: unless-stopped
ports:
- 6333:6333
volumes:
- qdrant_storage:/qdrant/storage
volumes:
ollama_data:
n8n_storage:
postgres_data:
qdrant_storage:
networks:
net:
name: net
driver: bridge