docker-compopse.yml

 

version: '2'

services:
 wordpress:
 depends_on:
 - mysql
 image: wordpress:php7.0
 ports:
 - "8080:80"
 volumes:
 - ./htdocs/assets:/var/www/html/wp-content
 links:
 - mysql
 environment:
 WORDPRESS_DB_HOST: mysql:3306
 WORDPRESS_DB_PASSWORD: wp

 mysql:
 image: mariadb:10.1.19
 ports:
 - "8081:3306"
 volumes:
 - ./databases:/var/lib/mysql
 environment:
 MYSQL_ROOT_PASSWORD: wp