Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.