Created
November 15, 2019 01:44
-
-
Save stedman/669a14cfe895ab418e34f938d6d3d5b1 to your computer and use it in GitHub Desktop.
Docker setup for WordPress + MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: user | |
MYSQL_PASSWORD: password | |
volumes: | |
- db_data:/var/lib/mysql | |
ports: | |
- 3306:3306 | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:5.1 | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_NAME: wordpress | |
WORDPRESS_DB_USER: user | |
WORDPRESS_DB_PASSWORD: password | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
ports: | |
- 8080:80 | |
volumes: | |
db_data: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment