Skip to content

Instantly share code, notes, and snippets.

@donniecode1983
Last active March 19, 2020 16:33
Show Gist options
  • Save donniecode1983/9bf177e65cb01d5b4825b04eb572792b to your computer and use it in GitHub Desktop.
Save donniecode1983/9bf177e65cb01d5b4825b04eb572792b to your computer and use it in GitHub Desktop.
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: corona
WORDPRESS_DB_PASSWORD: examplesdfa43f234t245456pass
WORDPRESS_DB_NAME: exampledb
volumes:
- wordpress:/var/www/html
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: corona
MYSQL_PASSWORD: examplesdfa43f234t245456pass
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