-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (105 loc) · 3.1 KB
/
docker-compose.yml
File metadata and controls
111 lines (105 loc) · 3.1 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
services:
open-webui:
env_file: .env
container_name: mcp-mysql-ops-open-webui
# image: ghcr.io/open-webui/open-webui:main
# image: ghcr.io/open-webui/open-webui:0.6.22
image: ghcr.io/open-webui/open-webui:0.7.2
depends_on:
mysql-init-data:
condition: service_completed_successfully
ports:
- "${DOCKER_EXTERNAL_PORT_OPENWEBUI}:8080"
environment:
- OLLAMA_BASE_URL=http://host.docker.internal:11434
volumes:
- open-webui-data:/app/backend/data
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
mcp-server:
env_file: .env
container_name: mcp-mysql-ops-mcp-server
image: call518/mcp-server-mysql-ops:1.0.1
ports:
- "${DOCKER_EXTERNAL_PORT_MCP_SERVER}:8000" ### (WARNING) Must be same with port number of 'FASTMCP_PORT', 'mcp-config.json' and 'mcp-config.json.http'
volumes:
- ./src:/app/src
- ./scripts:/app/scripts
- ./.env:/app/.env:ro
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 8000 && sleep 5"]
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
mcpo-proxy:
env_file: .env
image: call518/mcpo-proxy-mysql-ops:1.0.1
container_name: mcp-mysql-ops-mcpo-proxy
depends_on:
mcp-server:
condition: service_healthy
ports:
- "${DOCKER_EXTERNAL_PORT_MCPO_PROXY}:8000"
volumes:
- ./mcp-config.json.http:/app/config/mcp-config.json
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
#------------------------------------------------------
mysql:
env_file: .env
container_name: mcp-mysql-ops-mysql-${MYSQL_VERSION}
image: mysql:8
environment:
# for 'root' user
MYSQL_ROOT_HOST: '${MYSQL_ROOT_HOST}'
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
# for normal user
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
MYSQL_DATABASE: '${MYSQL_DATABASE}'
ports:
- '${MYSQL_PORT}:3306'
volumes:
- 'mysql-data:/var/lib/mysql'
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
start_period: 5s
interval: 10s
retries: 5
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
mysql-init-data:
env_file: .env
container_name: mcp-mysql-ops-mysql-init-data
image: mysql:8
environment:
MYSQL_ROOT_HOST: '${MYSQL_ROOT_HOST}'
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
MYSQL_DATABASE: '${MYSQL_DATABASE}'
depends_on:
mysql:
condition: service_healthy
entrypoint: /bin/bash
command:
- "-c"
- |
/scripts/create-test-data.sh
volumes:
- ./scripts:/scripts:ro
extra_hosts:
- "host.docker.internal:host-gateway"
restart: no
volumes:
open-webui-data:
name: open-webui-data-mcp-mysql-ops
mysql-data:
name: mysql-data-mcp-mysql-ops