version: '2'
services:
  web:
    extends:
      file: docker-compose.base.yml
      service: web
    volumes:
      - ./docker/web/php.ini-development:/usr/local/etc/php/php.ini
      - ./docker/web/local/default.conf:/etc/nginx/sites-available/default
    ports:
      - "${DOCKER_APP_PORT}:80"
  node:
    extends:
      file: docker-compose.base.yml
      service: node
  redis:
    extends:
      file: docker-compose.base.yml
      service: redis
  mysql:
    extends:
      file: docker-compose.base.yml
      service: mysql
    environment:
      MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
      MYSQL_DATABASE: "${DB_DATABASE}"
      MYSQL_USER: "${DB_USERNAME}"
      MYSQL_PASSWORD: "${DB_PASSWORD}"
    ports:
      - "${DOCKER_DB_PORT}:3306"
networks:
  backend:
    driver: "bridge"
  frontend:
    driver: "bridge"
volumes:
  mysqldata:
    driver: "local"
  redisdata:
    driver: "local"