Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Compose file for local Wordpress development
version: '3.3'
services:
db:
container_name: 'local-wordpress-db'
image: 'mysql:5.7'
volumes:
- './data/mysql:/var/lib/mysql'
ports:
- 18766:3306
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress_db
MYSQL_USER: wordpress_user
MYSQL_PASSWORD: wordpress
phpmyadmin:
container_name: 'admin-tool'
image: phpmyadmin/phpmyadmin:latest
ports:
- 8081:80
environment:
MYSQL_ROOT_PASSWORD: wordpress
wordpress:
container_name: 'local-wordpress'
depends_on:
- db
image: 'wordpress:latest'
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: 'db:3306'
WORDPRESS_DB_USER: wordpress_user
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress_db
WORDPRESS_DEBUG: 1
volumes:
- "./cz-gallery-plugin:/var/www/html/wp-content/plugins/cz-gallery-plugin"
- "./cz-theme:/var/www/html/wp-content/themes/cz-theme"
- "./sparkling:/var/www/html/wp-content/themes/sparkling"
- "./uploads:/var/www/html/wp-content/uploads"
@thomi137
Copy link
Author

thomi137 commented Jul 31, 2020

Feel free to fork! Make sure you adjust the volumes to your liking. For questions, feel free to contact me at tp@thomit.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment