version: '3'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: app
    restart: unless-stopped
    volumes:
      - ./:/var/www/html
      - ./docker/php/local.ini:/usr/local/etc/php/conf.d/laravel.ini
    networks:
      - app-network

  nginx:
    image: nginx:latest
    container_name: nginx
    restart: unless-stopped
    ports:
      - ${APP_PORT:-80}:80
    volumes:
      - ./docker/nginx/conf.d/:/etc/nginx/conf.d/
      - ./:/var/www/html
    depends_on:
      - app
    networks:
      - app-network


networks:
  app-network:
    driver: bridge
