Skip to content

Instantly share code, notes, and snippets.

@AndresReyesDev
Last active August 4, 2021 13:17
Show Gist options
  • Save AndresReyesDev/b5149575423b1729da1292f45b8d31b5 to your computer and use it in GitHub Desktop.
Save AndresReyesDev/b5149575423b1729da1292f45b8d31b5 to your computer and use it in GitHub Desktop.
Wordpress Docker ready for development through WSL2 on Windows
version: "3.9"
services:
db:
image: mysql:5.7
volumes:
- wp_master_db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- .:/var/www/html
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
wp_master_db_data: {}
wp_master_wordpress_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment