Skip to content

Instantly share code, notes, and snippets.

@lucasprogamer
Last active July 4, 2018 14:53
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 lucasprogamer/4f95b88785462122d619cdd3ab907975 to your computer and use it in GitHub Desktop.
Save lucasprogamer/4f95b88785462122d619cdd3ab907975 to your computer and use it in GitHub Desktop.
version: '2'
# Named volumes
volumes:
# MySQL Data
wordpress-mysql-data:
driver: local
# Redis Data
wordpress-redis-data:
driver: local
services:
# MySQL (5.7)
mysql:
image: mysql:5.7
container_name: wordpress-mysql
volumes:
- wordpress-mysql-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=wordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
# PHP (with Nginx)
# you can change from nginx to apache, just change session 'image'
app:
image: ambientum/php:7.2-nginx
container_name: wordpress-app
volumes:
- .:/var/www/app
ports:
- "80:8080"
links:
- mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment