forked from weam-ai/weam
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
207 lines (183 loc) · 5 KB
/
docker-compose.yml
File metadata and controls
207 lines (183 loc) · 5 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
services:
redis:
image: "redis/redis-stack:latest" # Image name local developement with dashboard
container_name: redis_container # Container name
volumes:
- redis_data:/data
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 5
app:
image: weamai-app:latest
container_name: weam-frontend-container
ports:
- "3000:3000"
restart: always
env_file:
- .env # Load environment variables from a .env file
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- ./nextjs:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/.next
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- app-network
depends_on:
- nodejs
- mongo
nodejs:
build:
context: ./nodejs
dockerfile: Dockerfile # Use the Dockerfile in the current directory
container_name: node_app
ports:
- "4050:4050"
- "3006:3006" # Expose MCP server port
env_file:
- .env # Load environment variables from a .env file
environment:
- MCP_SERVER_URL=http://localhost:3006 # Override for Docker networking
- OLLAMA_URL=http://host.docker.internal:11434 # Ollama access from Docker container
volumes:
- ./nodejs:/usr/src/app
- /usr/src/app/node_modules
- ./nodejs/storage:/usr/src/app/storage
- /var/run/docker.sock:/var/run/docker.sock
- ${PWD}:/workspace
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- app-network
depends_on:
- mongo
- minio
qdrant_primary:
image: "qdrant/qdrant:latest"
container_name: qdrant_primary # 👈 Add this to both nodes
ports:
- "${QDRANT_DASHBOARD_PORT}:${QDRANT_DASHBOARD_PORT}"
environment:
QDRANT__CLUSTER__ENABLED: true
QDRANT__LOG_LEVEL: INFO
command: "./qdrant --uri http://qdrant_primary:${QDRANT_NODE_PORT}"
volumes:
- ./data/qdrant_primary_data:/qdrant/storage
restart: always
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '2.0'
memory: 2G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app-network
qdrant_secondary:
image: "qdrant/qdrant:latest"
container_name: qdrant_secondary
depends_on:
- qdrant_primary
environment:
QDRANT__CLUSTER__ENABLED: true
QDRANT__LOG_LEVEL: INFO
command: "./qdrant --bootstrap http://qdrant_primary:${QDRANT_NODE_PORT} --uri http://qdrant_secondary:${QDRANT_NODE_PORT}"
volumes:
- ./data/qdrant_secondary_data:/qdrant/storage
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '2.0'
memory: 2G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 10s # Increased interval
timeout: 5s # Increased timeout
retries: 10 # Increased retries
restart: always
networks:
- app-network
mongo:
image: mongo:latest
container_name: weamai-mongo-1
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
- MONGO_INITDB_DATABASE=test
volumes:
- mongo-data:/data/db
networks:
- app-network
# mongo-express:
# image: mongo-express:latest
# restart: always
# ports:
# - "8081:8081"
# environment:
# - ME_CONFIG_MONGODB_ENABLE_ADMIN=true
# - ME_CONFIG_MONGODB_ADMINUSERNAME=admin
# - ME_CONFIG_MONGODB_ADMINPASSWORD=password
# - ME_CONFIG_BASICAUTH_USERNAME=weam
# - ME_CONFIG_BASICAUTH_PASSWORD=password
# - ME_CONFIG_MONGODB_SERVER=mongo
# networks:
# - app-network
# depends_on:
# - mongo
minio:
image: minio/minio:latest
container_name: minio
ports:
- "${MINIO_PORT}:${MINIO_PORT}" # S3 API port
- "${MINIO_DASHBOARD_PORT}:${MINIO_DASHBOARD_PORT}" # Web UI port
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=${AWS_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY}
command: server /data --console-address ":${MINIO_DASHBOARD_PORT}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${MINIO_PORT}/minio/health/live"]
interval: 30s
timeout: 10s
retries: 3
networks:
- app-network
minio-init:
image: minio/mc
env_file: ${ENV_FILE}
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh", "/minio.sh"]
volumes:
- ./minio.sh:/minio.sh:ro
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
mongo-data:
redis_data:
minio_data:
app:
db:
data:
localstack: