[base]
path = {base}
network = web

[mysql]
port = 3309:3306
volumes = {container}conf/db/mysql:/etc/mysql,/mysql/{name}/data:/var/lib/mysql
environment = MYSQL_ROOT_PASSWORD=123456

[#mysql]
image = mariadb
port = 3309:3306
volumes = {container}conf/db/mariadb:/etc/mysql,/mysql/{name}/data:/var/lib/mysql
environment = MYSQL_ROOT_PASSWORD=123456

[#php]
port = 8082:8080
link = [mysql]{num}:[mysql]{num}
volumes_from = [mysql]{num}
volumes = {container}web:/www,{container}conf/web/php:/etc/php5
#host = test:127.0.0.1,test1:127.0.0.1
# 容器里对宿主机提供的指令的别名，可以直接用php -i访问容器中的php命令了
alias = php,composer

[php]
image = php7
port = 8082:8080
link = [mysql]{num}:[mysql]{num}
volumes_from = [mysql]{num}
volumes = {container}web:/www,{container}conf/web/php7:/etc/php7
#host = test:127.0.0.1,test1:127.0.0.1
# 容器里对宿主机提供的指令的别名，可以直接用php -i访问容器中的php命令了
alias = php,composer

[nginx]
port = 80:80,443:443
link = [php]{num}:[php]{num}
volumes_from = [php]{num}
volumes = {container}web:/www,{container}conf/web/nginx:/etc/nginx,{container}logs/nginx/{name}/logs:/var/log/nginx

[#nginx]
image = openresty
port = 80:80,443:443
link = [php]{num}:[php]{num}
volumes_from = [php]{num}
volumes = {container}web:/www,{container}conf/web/nginx:/usr/local/openresty/nginx/conf,{container}logs/nginx/openresty_{name}/logs:/var/log/nginx
command = nginx