thx/rap2-delos

docker 运行报错

q770857088 opened this issue · 1 comments

BUG描述
docker 安装 初始化报错
docker-compose exec delos node scripts/init
Unable to connect to the database: HostNotFoundError [SequelizeHostNotFoundError]: getaddrinfo ENOTFOUND mysql
at /app/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:127:19
at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
复现步骤
docker-compose exec delos node scripts/init

期望结果

实际结果

截图

环境
centos7.9

  • 是否是自建服务器?如果为自建,请提供操作系统版本
  • 如果是前端错误,请提供浏览器版本
  • 其它可能帮助我们排查问题的环境信息

附加信息

修改docker-compose.yml中mysql root用户密码配置

  MYSQL_ALLOW_EMPTY_PASSWORD: "true"
  MYSQL_DATABASE: "rap2"
  MYSQL_ROOT_PASSWORD: ""
  #MYSQL_USER: "root"
  #MYSQL_PASSWORD: ""