version: '2'
services:
  web:
    build:
      context: ./docker/web
      dockerfile: Dockerfile
    image: locator/php:7.2
    volumes:
      - ./application:/var/www/html
      - ./docker/web/nginx.conf:/etc/nginx/nginx.conf
      - ./docker/web/application.conf:/etc/supervisor/conf.d/application.conf
    command: /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
    working_dir: /var/www/html
    networks:
      - backend
      - frontend
  node:
    build:
      context: ./docker/node
      dockerfile: Dockerfile
    image: official/node:latest
    volumes:
      - ./application:/var/www/html
    working_dir: /var/www/html
    networks:
      - backend
  redis:
    image: redis:alpine
    volumes:
      - redisdata:/data
    networks:
      - backend
  mysql:
    image: mysql:5.7.24
    volumes:
      - mysqldata:/var/lib/mysql
    networks:
      - backend