version: '3.8'

services:

  app:
    build:
      context: .
      dockerfile: docker/php/Dockerfile
    container_name: symfony_app
    volumes:
      - .:/var/www/html
    networks:
      - symfony
    extra_hosts:
      - "host.docker.internal:host-gateway"

  nginx:
    image: nginx:latest
    container_name: symfony_nginx
    ports:
      - "8080:80"
    volumes:
      - .:/var/www/html
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app
    networks:
      - symfony

networks:
  symfony:
    driver: bridge
