Skip to content

Instantly share code, notes, and snippets.

@vsnguyen
Created August 24, 2020 19:49
Show Gist options
  • Save vsnguyen/67ad5182aab14cfaa9f60c8c7aace5f7 to your computer and use it in GitHub Desktop.
Save vsnguyen/67ad5182aab14cfaa9f60c8c7aace5f7 to your computer and use it in GitHub Desktop.
WordPress Docker-Compose
version: '3.1'
services:
app:
depends_on:
- db
image: wordpress:latest
ports:
- 8000:80
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: root
WORDPRESS_DEBUG: 1
volumes:
- ./wp-content/plugins/:/var/www/html/wp-content/plugins/
- ./wp-content/themes/:/var/www/html/wp-content/themes/
- ./.htaccess:/var/www/html/.htaccess
networks:
- default
db:
image: mysql:5.7
command: --default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
environment:
MYSQL_ROOT_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: 0
volumes:
- ./.wp-volume:/var/lib/mysql
volumes:
wp-volume:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment