首页 > 其他 > 详细

使用docker-compose搭建WordPress

时间:2019-08-17 19:08:12      阅读:119      评论:0      收藏:0      [点我收藏+]

今天博主使用typecho各种不爽,索性干掉typecho,使用WordPress

依赖

  1. mysql
  2. nginx

yml 文件

version: '3'
services:
  nginx:
    image: nginx:1.13.9-alpine
    ports:
      - "80:80"
      - "443:443"
    restart: always
    volumes:
      - ./wordpress.conf:/etc/nginx/conf.d/default.conf
      - ./nginx_logs:/var/log/nginx
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - wordpress
    networks:
      - daryl_blog_net

  wordpress:
    image:  wordpress:latest
    restart: always
    volumes:
      - ./html:/var/www/html
    networks:
      - daryl_blog_net
    depends_on:
      - db
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: password

  db:
    image: mysql:5.7.23
    volumes:
      - ./mysql:/var/lib/mysql
      - ./mysql_logs:/var/logs/mysql
    restart: always
    env_file:
      - mysql.env
    ports:
      - "3306:3306"
    networks:
        - daryl_blog_net

networks:
  daryl_blog_net:
    driver: bridge
    ipam:
      config:
        - subnet: 192.168.100.0/24

使用docker-compose搭建WordPress

原文:https://www.cnblogs.com/daryl-blog/p/11369596.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!