Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker启动连不上数据库 #327

Open
237035848 opened this issue Feb 9, 2023 · 0 comments
Open

docker启动连不上数据库 #327

237035848 opened this issue Feb 9, 2023 · 0 comments

Comments

@237035848
Copy link

使用该compose启动docker报错
version: "3.9"
services:
yao:
image: yaoapp/yao-wms:1.0.3-amd64
environment:
- YAO_INIT=demo
- YAO_PROCESS_RESET=flows.init.menu
- YAO_PROCESS_DEMO=flows.demo.data
- YAO_DB_DRIVER=mysql
- YAO_DB_PRIMARY="yao:123456@tcp(mysql:3306)/yao?charset=utf8mb4"
ports:
- "40006:5099"
volumes:
- D:\SynologyDrive\Work\docker\data\yao:/data/app
depends_on:
- mysql

mysql:
image: yaoapp/mysql:8.0-amd64
environment:
- MYSQL_PASSWORD=123456
volumes:
data: {}

错误日志:
compose-yao-1 | time="2023-02-09T08:21:12Z" level=warning msg="Can't load env file. open /data/app/.env: no such file or directory"
compose-yao-1 | panic: Connection timeout 5s (mysql: "yao:123456@tcp(mysql:3306)/yao?charset=utf8mb4")
compose-yao-1 |
compose-yao-1 | goroutine 27 [running]:
compose-yao-1 | github.com/yaoapp/xun/capsule.(*Manager).AddConnection.func1()
compose-yao-1 | /home/runner/work/yao/xun/capsule/capsule.go:86 +0x108
compose-yao-1 | created by github.com/yaoapp/xun/capsule.(*Manager).AddConnection
compose-yao-1 | /home/runner/work/yao/xun/capsule/capsule.go:83 +0x2ba
compose-yao-1 exited with code 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant