version: '2'

services:
  php:
    container_name: php-school-fpm
    image: php:7-fpm
    build:
      context: .
      dockerfile: ./.docker/files/php-school-fpm
    volumes:
      - .:/var/www/html
    environment:
      - MYSQL_USER
      - MYSQL_PASSWORD
      - XDEBUG_ENABLE
      - XDEBUG_CONFIG
    ports:
      - 9000

  db:
    container_name: php-school-db
    image: mysql:5.6
    links:
      - php
    volumes:
        - "./.docker/mysql:/var/lib/mysql"
        - "./.docker/db/:/docker-entrypoint-initdb.d/"
    ports:
        - "3306"
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD
      - MYSQL_DATABASE
      - MYSQL_USER
      - MYSQL_PASSWORD

  nginx:
    container_name: php-school-nginx
    image: nginx:latest
    links:
      - php
    ports:
      - 8000:80
    volumes:
      - ./nginx-dev.conf:/etc/nginx/conf.d/default.conf
      - .:/var/www/html

  redis:
      container_name: php-school-redis
      image: redis
      ports:
          - "6379"

version: '2'

services:
  php:
    container_name: php-school-fpm
    image: php:7-fpm
    build:
      context: .
      dockerfile: ./.docker/files/php-school-fpm
    volumes:
      - .:/var/www/html
    environment:
      - MYSQL_USER
      - MYSQL_PASSWORD
      - XDEBUG_ENABLE
      - XDEBUG_CONFIG
    ports:
      - 9000

  db:
    container_name: php-school-db
    image: mysql:latest
    links:
      - php
    volumes:
        - "./.docker/mysql:/var/lib/mysql"
        - "./.docker/db/:/docker-entrypoint-initdb.d/"
    ports:
        - "3306"
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD
      - MYSQL_DATABASE
      - MYSQL_USER
      - MYSQL_PASSWORD

  nginx:
    container_name: php-school-nginx
    image: nginx:latest
    links:
      - php
    ports:
      - 8000:80
    volumes:
      - ./nginx-dev.conf:/etc/nginx/conf.d/default.conf
      - .:/var/www/html

  redis:
      container_name: php-school-redis
      image: redis
      ports:
          - "6379"

Update to latest mysql image
Update to latest mysql image
