docker-compose wordpress安装
FCAT 2020/11/2 wordpressdocker-compose
构建环境:docker、docker-compose
# 配置文件
vim /docker/docker-compose.yml
services:
wordpress:
container_name: wordpress
depends_on:
- mysql
image: wordpress:latest
volumes:
- /docker/wordpress/wordpress_data:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: IP:3306
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: 123456
WORDPRESS_DB_NAME: wordpress
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 运行
docker up -d
1
访问:http://ip:8000/
初始化用户名和密码