version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: sa_dl_app
    volumes:
      # Mounts local code over the image copy — live edits work without rebuilding (local dev only)
      - ./laravel:/var/www/html
    environment:
      APP_ENV: local
      APP_DEBUG: "true"
    networks:
      - sa_dl_network
    restart: unless-stopped

  nginx:
    image: nginx:alpine
    container_name: sa_dl_nginx
    ports:
      - "8080:80"
    volumes:
      - ./laravel:/var/www/html
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app
    networks:
      - sa_dl_network
    restart: unless-stopped

networks:
  sa_dl_network:
    driver: bridge
