Skip to content

Commit

Permalink
Revert "fix(docker-compose): ensure mysql starts before xagent-server" (
Browse files Browse the repository at this point in the history
OpenBMB#304)

Revert "fix(docker-compose): ensure mysql starts before xagent-server (OpenBMB#294)"

This reverts commit b592f73.
  • Loading branch information
sailaoda authored Dec 4, 2023
1 parent fe9bfea commit 36836a5
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
context: ./
dockerfile: dockerfiles/ToolServerManager/Dockerfile
ports:
- "8080:8080"
- 8080:8080
volumes:
- toolserverconfig:/app/assets/config
- /var/run/docker.sock:/var/run/docker.sock
Expand Down Expand Up @@ -40,6 +40,29 @@ services:
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:
Expand All @@ -53,7 +76,7 @@ services:
volumes:
- ./XAgentServer/database/sql:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "mysql -h localhost -u root -pxagent -e 'SELECT 1'"]
test: [ "CMD", "mysqladmin","ping", "-h", "localhost" ]
interval: 5s
timeout: 3s
retries: 20
Expand All @@ -68,32 +91,11 @@ services:
interval: 5s
timeout: 3s
retries: 20

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



volumes:
xagentmongodb:
xagentmongodb:
toolserverconfig:
name: toolserverconfig
driver: local
Expand Down

0 comments on commit 36836a5

Please sign in to comment.