码迷,mamicode.com
首页 > 其他好文 > 详细

docker-compose构建wordpress

时间:2020-07-07 15:36:54      阅读:46      评论:0      收藏:0      [点我收藏+]

标签:vol   lang   roo   aml   pre   mysql   pos   var   depends   

docker-compose 构建wordpress

直接上docker-compose.yml文件

version: ‘3‘
services:
   db:
     image: mysql:5.7
     volumes:
       - /data/db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress
   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     volumes:
       - /data/web_data:/var/www/html
     ports: 
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress

docker-compose构建wordpress

标签:vol   lang   roo   aml   pre   mysql   pos   var   depends   

原文地址:https://blog.51cto.com/14482279/2509090

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!