Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.