version: '3.7'
# Services
services:
# Nginx Service
nginx:
image: nginx:latest
ports:
- 80:80
volumes:
- ./:/var/www/php
- ./.docker/nginx/conf.d:/etc/nginx/conf.d
depends_on:
- php
# PHP Service
php:
image: php-fpm
build: ./.docker/php
working_dir: /var/www/php
volumes:
- ./:/var/www/php
depends_on:
- mysql
# MySQL Service
mysql:
image: mysql
ports:
- 3306:3306
volumes:
- ./.docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./.docker/mysqldata:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: toor
https://gist.github.com/jvdi/964e9e5f7fc83f7c25866f37724f2304
دیدگاهتان را بنویسید