Skip to content

Instantly share code, notes, and snippets.

@theanam
Created September 22, 2019 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theanam/9725a4429bbec6a0f0c3a1b49cf2e041 to your computer and use it in GitHub Desktop.
Save theanam/9725a4429bbec6a0f0c3a1b49cf2e041 to your computer and use it in GitHub Desktop.
Docker Compose for Simple WordPress
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