--- version: '3' services: app: build: context: ./docker/php environment: DB_HOST: mysql volumes: - ./:/var/www - ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf depends_on: - mysql nginx: image: nginx:1.13.8 command: /bin/bash -c "exec nginx -g 'daemon off;'" volumes: - ./:/var/www - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf ports: - 80:80 depends_on: - app mysql: image: mysql:5.7.26 environment: - MYSQL_DATABASE=phpvms - MYSQL_ROOT_PASSWORD= - MYSQL_ALLOW_EMPTY_PASSWORD=yes volumes: - mysql-data:/var/lib/mysql ports: - 3306 volumes: mysql-data: