67 lines
2.4 KiB
YAML
67 lines
2.4 KiB
YAML
# docker-compose for local / homelab deployment.
|
|
#
|
|
# Two usage patterns:
|
|
#
|
|
# 1. Local MVP test — host network, proxy-DHCP off (don't fight your
|
|
# existing DHCP server on the LAN), TFTP + HTTP exposed on the host:
|
|
#
|
|
# docker compose up pxeforge-dev
|
|
#
|
|
# 2. Real PXE deployment — host network, proxy-DHCP on, runs on a box
|
|
# plugged into the PXE network:
|
|
#
|
|
# # First set PXEFORGE_PUBLIC_IP to this host's LAN address in .env
|
|
# docker compose up pxeforge
|
|
#
|
|
# On Linux hosts, `network_mode: host` gives the container direct access to
|
|
# the physical NIC — required for DHCP proxy because CNI overlays and Docker
|
|
# bridges do not forward DHCPDISCOVER broadcasts into containers.
|
|
#
|
|
# On macOS / Windows hosts, `network_mode: host` is limited — the daemon
|
|
# runs in a Linux VM (Colima/Docker Desktop) so the "host" network is the
|
|
# VM, not your Mac. Proxy-DHCP is not feasible on macOS; use `pxeforge-dev`
|
|
# with published ports and set DHCP-MODE=disabled.
|
|
|
|
services:
|
|
# Real PXE deployment (Linux hosts).
|
|
pxeforge:
|
|
image: pxeforge:0.1.0
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/Dockerfile
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
environment:
|
|
# REQUIRED on multi-homed hosts. Set to this machine's LAN IP so the
|
|
# advertised iPXE URLs actually resolve from the PXE clients. Without
|
|
# this, PXEForge will refuse to start rather than advertise a
|
|
# loopback address that can't be reached.
|
|
PXEFORGE_PUBLIC_IP: ${PXEFORGE_PUBLIC_IP:?set this to the host LAN IP}
|
|
PXEFORGE_DHCP_MODE: proxy
|
|
PXEFORGE_LOG: info
|
|
volumes:
|
|
- ./data/isos:/var/lib/pxeforge/isos
|
|
- ./data/work:/var/lib/pxeforge/work
|
|
|
|
# Dev / MVP container: published ports, DHCP disabled, HTTP on 8080.
|
|
# Use this on laptops where you want to curl the API or UI without
|
|
# running an actual PXE chain.
|
|
pxeforge-dev:
|
|
image: pxeforge:0.1.0
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/Dockerfile
|
|
environment:
|
|
PXEFORGE_PUBLIC_IP: ${PXEFORGE_PUBLIC_IP:-127.0.0.1}
|
|
PXEFORGE_DHCP_MODE: disabled
|
|
PXEFORGE_HTTP_PORT: "8080"
|
|
PXEFORGE_TFTP_PORT: "6969"
|
|
PXEFORGE_DHCP_PORT: "6767"
|
|
PXEFORGE_LOG: info,pxeforge=debug
|
|
ports:
|
|
- "8080:8080/tcp"
|
|
- "6969:6969/udp"
|
|
volumes:
|
|
- ./data/isos:/var/lib/pxeforge/isos
|
|
- ./data/work:/var/lib/pxeforge/work
|