Created
September 22, 2019 13:11
-
-
Save theanam/9725a4429bbec6a0f0c3a1b49cf2e041 to your computer and use it in GitHub Desktop.
Docker Compose for Simple WordPress
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" | |
services: | |
# Wordpress | |
mysite: | |
image: wordpress:5.2.3-php7.1-apache | |
volumes: | |
- ./themes:/var/www/html/wp-content/themes | |
- ./plugins:/var/www/html/wp-content/plugins | |
ports: | |
- 8080:80 | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: wordpressuser | |
WORDPRESS_DB_PASSWORD: khubgupon | |
WORDPRESS_DB_NAME: mywordpressdb | |
# Database | |
db: | |
image: mysql:5.7 | |
environment: | |
MYSQL_DATABASE: mywordpressdb | |
MYSQL_USER: wordpressuser | |
MYSQL_PASSWORD: khubgupon | |
MYSQL_RANDOM_ROOT_PASSWORD: '1' | |
volumes: | |
- db:/var/lib/mysql | |
volumes: | |
db: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment