Last active
May 21, 2020 20:54
-
-
Save maxjf1/e5f57b1fbd4838fce78fedb0c842cd47 to your computer and use it in GitHub Desktop.
Docker Compose for WordPress Development
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.1" | |
services: | |
wordpress: | |
image: wordpress | |
restart: unless-stopped | |
ports: | |
- 8080:80 | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
WORDPRESS_DB_NAME: wordpress | |
volumes: | |
- ./wordpress-theme:/var/www/html/wp-content/wordpress-theme | |
- ./wp-content:/var/www/html/wp-content | |
depends_on: | |
- db | |
db: | |
image: mysql:5.7 | |
restart: unless-stopped | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
volumes: | |
- ./database:/var/lib/mysql | |
# - ./backup.sql:docker-entrypoint-initdb.d/backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment