Last active
September 30, 2020 11:44
-
-
Save AlaeddineMessadi/7ba30ea2f97b9fa842aa860e48672f6a to your computer and use it in GitHub Desktop.
Quickstart: Compose and WordPress ( MySQL, WordPress) kickstarter docker-compose.yml
This file contains hidden or 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.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root_password | |
MYSQL_DATABASE: wp_example | |
MYSQL_USER: user_example | |
MYSQL_PASSWORD: pwd_example | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
# Create ./wp-content under root diractory for plugin and theme mapping | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
ports: | |
- "8000:80" | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_USER: user_example | |
WORDPRESS_DB_PASSWORD: pwd_example | |
WORDPRESS_DB_NAME: wp_example | |
volumes: | |
db_data: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker-compose-wordpress.yml
todocker-compose.yml
yml
file isWORDPRESS_DB_USER
,WORDPRESS_DB_PASSWORD
,WORDPRESS_DB_NAME
)docker-compose up -d
to pull the necessary images and starts the wordpress and database containers