-
Notifications
You must be signed in to change notification settings - Fork 845
/
docker-compose.yml
110 lines (101 loc) · 2.61 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
version: '3'
services:
ToolServerManager:
image: xagentteam/toolserver-manager:latest
build:
context: ./
dockerfile: dockerfiles/ToolServerManager/Dockerfile
ports:
- 8080:8080
volumes:
- toolserverconfig:/app/assets/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
DB_HOST: db
DB_PORT: 27017
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_COLLECTION: ${DB_COLLECTION}
depends_on:
- db
command: ["--workers","2","-t","600"]
# This will create a test node that will never be used by XAgent
ToolServerNode:
image: xagentteam/toolserver-node:latest
build:
context: ./
dockerfile: dockerfiles/ToolServerNode/Dockerfile
volumes:
- "toolserverconfig:/app/assets/config"
db:
image: mongo
volumes:
- xagentmongodb:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${DB_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD}
logging:
driver: "none"
XAgentServer:
image: xagentteam/xagent-server:latest
build:
context: ./
dockerfile: dockerfiles/XAgentServer/Dockerfile
container_name: XAgent-Server
env_file:
- .env
environment:
- TOOLSERVER_URL=http://ToolServerManager:8080
- MYSQL_DB_URL=mysql+pymysql://root:xagent@xagent-mysql:3306/xagent
- REDIS_HOST=xagent-redis
volumes:
- ./assets:/app/assets:ro
ports:
- "5173:5173"
- "8090:8090"
depends_on:
xagent-mysql:
condition: service_healthy
xagent-redis:
condition: service_healthy
xagent-mysql:
image: mysql
command:
- --default-authentication-plugin=caching_sha2_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: xagent
ports:
- "3306:3306"
volumes:
- ./XAgentServer/database/sql:/docker-entrypoint-initdb.d
healthcheck:
# test: [ "CMD", "mysqladmin","ping", "-h", "localhost" ]
test: ["CMD-SHELL", "mysql -h localhost -u root -pxagent -e 'SELECT 1'"]
#interval: 10s
timeout: 20s
retries: 20
xagent-redis:
image: redis
ports:
- "6379:6379"
command: redis-server --requirepass xagent
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 20
volumes:
xagentmongodb:
toolserverconfig:
name: toolserverconfig
driver: local
driver_opts:
type: none
device: ./assets/config
o: bind
networks:
default:
name: tool-server-network
driver: bridge