php - Docker - 等待 mysql 服务器
问题描述
我正在尝试在本地运行 Shopware Image。当我从 dnhsoft repo 执行 init.sh 文件时,命令停留在
Waiting for mysql server...
我已经尝试过不同的图像。它对我不起作用。
我使用了这个 docker-compose.yml:
version: "2"
services:
shop:
image: dnhsoft/shopware:5.6.9
links:
- mysql:db
- mailhog
ports:
- "8000:80"
volumes:
- "./../mtsTheme:/shopware/themes/Frontend/mtsTheme"
- "./../Local:/shopware/engine/Shopware/Plugins/Local"
mysql:
image: mysql:5.7
ports:
- "3306"
volumes:
## this makes the mysql shopware friendly, otherwise we have some utf8 issues
# - "./docker/mysql/mysqld_charset.cnf:/etc/mysql/conf.d/mysqld_charset.cnf"
- "./volumes/mysql:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: 123456
TZ: Europe/Berlin
pma:
image: phpmyadmin/phpmyadmin:4.8
links:
- mysql:db
ports:
- "8001:80"
environment:
PMA_USER: root
PMA_PASSWORD: 123456
TZ: Europe/Berlin
mailhog:
image: mailhog/mailhog
expose:
- "1025"
- "8025"
ports:
- "8025:8025"
environment:
TZ: Europe/Berlin
解决方案
推荐阅读
- excel - VBA IF SUM 函数
- android - 如何使用 Room Flowable 获取 onComplete
- >?
- android - Android Instant App 启动ActivityForResult
- google-sheets - 交替循环 (T)op/(B) 底部序列
- javascript - 在不同的模式上显示重力形式输入
- python - 用于管理正则表达式替换索引映射的 Python 片段?
- apache-spark - Cassandra 计数查询抛出 ReadFailureException
- mysql - Need to iterate through array to capture all rows - currently only saving the number in the [0] or first record
- excel - 如何与python共享excel工作簿?
- jsp - Sitemesh3 装饰器仅适用于 JSP 扩展