Skip to content

Instantly share code, notes, and snippets.

@kitz99
Created July 8, 2018 19:22
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 kitz99/87e536304331ab92846a8c38c732819d to your computer and use it in GitHub Desktop.
Save kitz99/87e536304331ab92846a8c38c732819d to your computer and use it in GitHub Desktop.
version: '3'
services:
db:
image: mysql:5.7
volumes:
- ./data_dir:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: choosepasswd
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./wordpress:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
data_dir:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment