首页 > 解决方案 > 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

标签: phpmysqldockershellshopware

解决方案


推荐阅读