WordPress
Docker
docker-compose

WordPress プラグイン開発用のdocker-compose

暫定的

phpadminとmysql, wordpressを立てる

version: '2'

services:
db:
image: mysql:5.7
container_name: wordpress_mysql
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
- wordpress_network

wordpress:
image: wordpress:latest
container_name: wordpress_server
volumes:
- "$PWD:/var/www/html"
- "$PWD/.docker/backup:/tmp/backup"
- "$PWD/.docker/log:/tmp/log"
depends_on:
- db
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: wordpress
networks:
- wordpress_network

phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOST=db:3306
- PMA_USER=wordpress
- PMA_PASSWORD=wordpress
links:
- db
ports:
- 8080:80
volumes:
- /sessions
networks:
- wordpress_network

volumes:
db_data:
networks:
wordpress_network: