docker-compose.yml 方式部署wordpress app跑起来之后 一会儿挂一个container 最后全挂完了,不知道为什么!
来源:7-7 Docker Stack部署Wordpress
__Frank
2018-03-12
services: web: image: wordpress ports: - 8080:80 environment: WORDPRESS_DB_HOST: mysql WORDPRESS_DB_PASSWORD: root networks: - my-network depends_on: - mysql deploy: mode: replicated replicas: 3 update_config: parallelism: 1 delay: 10s restart_policy: condition: on-failure delay: 5s max_attempts: 3 mysql: image: mysql environment: MYSQL_DATEBASE: wordpress WORDPRESS_DB_PASSWORD: root volumes: - mysql-data:/var/lib/mysql networks: - my-network deploy: mode: global placement: constraints: - node.role == manager volumes: mysql-data: networks: my-network: driver: overlay
写回答
1回答
-
您可以用 docker service logs +service名字,比如 docker service logs wordpress_mysql去看容器的log。 应该是mysql的root password没设置
You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD
and MYSQL_RANDOM_ROOT_PASSWORD
032018-03-13
相似问题