# PXE Boot Stack — Tech to School
# Runs on the PXE VM (Ubuntu 24.04) on Beast
# Usage: docker compose up -d

services:
  # TFTP server — serves iPXE bootloader to PXE clients
  tftp:
    image: ghcr.io/kalaksi/tftpd:latest
    container_name: pxe-tftp
    network_mode: host
    volumes:
      - ./tftpboot:/var/tftpboot:ro
    restart: unless-stopped

  # HTTP server — serves WinPE boot files, WIM images, and scripts
  nginx:
    image: nginx:alpine
    container_name: pxe-http
    network_mode: host
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
      - ./tftpboot:/srv/tftpboot:ro
      - ./winpe:/srv/winpe:ro
      - ./images:/srv/images:ro
      - ./scripts:/srv/scripts:ro
    restart: unless-stopped

  # SMB share — WinPE connects here for WIM deployment via DISM
  samba:
    image: dperson/samba
    container_name: pxe-smb
    network_mode: host
    volumes:
      - ./deploy:/share/deploy
    environment:
      - USER=pxe;pxe
      - SHARE=deploy;/share/deploy;yes;no;no;pxe
    restart: unless-stopped
