Skip to content

Instantly share code, notes, and snippets.

@jmmeacham
Last active May 4, 2020 18:56
Show Gist options
  • Save jmmeacham/ed2d11dcec6e1d5aed9a9b9c8843d2d4 to your computer and use it in GitHub Desktop.
Save jmmeacham/ed2d11dcec6e1d5aed9a9b9c8843d2d4 to your computer and use it in GitHub Desktop.
version: "3.3"
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
- wordpress:/var/www/html
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: "1"
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment