My in-progress docker-compose.yml file for local WordPress Development
version: "3.3"
services:
my-wpdb:
image: mariadb
ports:
- "8081:3306"
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: password
volumes:
- db_data:/var/lib/mysql
my-wp:
image: wordpress
volumes:
- ./wp-content:/var/www/html/wp-content
ports:
- "8080:80"
links:
- my-wpdb:mysql
environment:
WORDPRESS_DB_HOST: my-wpdb
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: password
volumes:
db_data: