Docker 版本安装wordpress 博客
Docker 版本安装wordpress 博客

Docker 版本安装wordpress 博客

视频播放:https://www.youtube.com/watch?v=W3jVCzhFe30

WordPress docker 页面:wordpress – 仓库地址

Docker Compose 官方文档:https://docs.docker.com/compose/install/

Docker Compose 菜鸟教程页面:https://www.runoob.com/docker/docker-compose.html

docker-compose.yml

version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb
    volumes:
      - ./wordpress:/var/www/html

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - ./db:/var/lib/mysql

volumes:
  wordpress:
  db:

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注