Skip to content

Instantly share code, notes, and snippets.

@sscholle
Last active May 6, 2019 09:00
Show Gist options
  • Save sscholle/ef16f51a2546bde3a45286e0b407faff to your computer and use it in GitHub Desktop.
Save sscholle/ef16f51a2546bde3a45286e0b407faff to your computer and use it in GitHub Desktop.
WordPress Docker Compose
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
volumes:
- ./docker/wp-data:/var/www/html
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
db:
image: mysql:5.7
restart: always
volumes:
- ./docker/mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
@sscholle
Copy link
Author

sscholle commented May 6, 2019

This is my Setup for running a WP instance in Docker (pretty standard stuff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment