Skip to content

Instantly share code, notes, and snippets.

@bloqhead
Last active May 15, 2019 13:36
Show Gist options
  • Save bloqhead/e08e003a2e101e24eb03f603659aefcd to your computer and use it in GitHub Desktop.
Save bloqhead/e08e003a2e101e24eb03f603659aefcd to your computer and use it in GitHub Desktop.
Simple WordPress Docker setup.
version: '3.3'
services:
mysql:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- mysql
image: wordpress:latest
volumes:
- ./wp-content:/var/www/html/wp-content
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
cli:
image: wordpress:cli
volumes:
- .:/var/www/html/
volumes:
db_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment