From 927ba376610e4c3a4776939034f1753b6ae2bc8e Mon Sep 17 00:00:00 2001 From: S Date: Sun, 1 Mar 2026 10:21:06 -0500 Subject: [PATCH] feat: add macvlan networking vars, remove host port mapping from .env.example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove UNRAID_GITEA_PORT, UNRAID_GITEA_SSH_PORT, FEDORA_GITEA_PORT, FEDORA_GITEA_SSH_PORT — containers now use their own LAN IPs on standard ports. Add DOCKER NETWORKING section with macvlan config (parent interface, subnet, gateway, IP range) and per-container static IPs (gitea, db, caddy) for both hosts. Update internal URL comments to reference container IPs. Co-Authored-By: Claude Opus 4.6 --- .env.example | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index f1f8911..7d25775 100644 --- a/.env.example +++ b/.env.example @@ -11,8 +11,6 @@ UNRAID_IP= # Static IP of Unraid server UNRAID_SSH_USER= # SSH username for Unraid UNRAID_SSH_PORT=22 # SSH port (default 22) -UNRAID_GITEA_PORT=3000 # Port Gitea web UI will listen on -UNRAID_GITEA_SSH_PORT=2222 # Port for git-over-SSH (host 22 is taken by SSH server) UNRAID_GITEA_DATA_PATH= # Absolute path on NVMe for Gitea data (e.g. /mnt/nvme/gitea) UNRAID_SSH_KEY= # Absolute path to SSH private key, e.g. /Users/you/.ssh/id_ed25519 (optional, uses ssh-agent if empty) @@ -23,12 +21,30 @@ UNRAID_SSH_KEY= # Absolute path to SSH private key, e.g. /User FEDORA_IP= # Static IP of Fedora server FEDORA_SSH_USER= # SSH username for Fedora FEDORA_SSH_PORT=22 # SSH port (default 22) -FEDORA_GITEA_PORT=3000 # Port Gitea web UI will listen on -FEDORA_GITEA_SSH_PORT=2222 # Port for git-over-SSH (host 22 is taken by SSH server) FEDORA_GITEA_DATA_PATH= # Absolute path on NVMe for Gitea data (e.g. /mnt/nvme/gitea) FEDORA_SSH_KEY= # Absolute path to SSH private key, e.g. /Users/you/.ssh/id_ed25519 (optional, uses ssh-agent if empty) +# ----------------------------------------------------------------------------- +# DOCKER NETWORKING (macvlan — each container gets its own LAN IP) +# ----------------------------------------------------------------------------- +UNRAID_MACVLAN_PARENT= # Host network interface (e.g. br0, eth0) +UNRAID_MACVLAN_SUBNET= # LAN subnet in CIDR (e.g. 192.168.1.0/24) +UNRAID_MACVLAN_GATEWAY= # LAN gateway (e.g. 192.168.1.1) +UNRAID_MACVLAN_IP_RANGE= # IP range for containers (e.g. 192.168.1.192/28 — 16 IPs) +UNRAID_GITEA_IP= # Static LAN IP for Gitea container +UNRAID_DB_IP= # Static LAN IP for DB container (leave empty if sqlite3) +UNRAID_CADDY_IP= # Static LAN IP for Caddy container + +FEDORA_MACVLAN_PARENT= # Host network interface (e.g. eth0) +FEDORA_MACVLAN_SUBNET= # LAN subnet in CIDR (e.g. 192.168.1.0/24) +FEDORA_MACVLAN_GATEWAY= # LAN gateway (e.g. 192.168.1.1) +FEDORA_MACVLAN_IP_RANGE= # IP range for containers (e.g. 192.168.1.208/28 — 16 IPs) +FEDORA_GITEA_IP= # Static LAN IP for Gitea container +FEDORA_DB_IP= # Static LAN IP for DB container (leave empty if sqlite3) +FEDORA_CADDY_IP= # Static LAN IP for Caddy container + + # ----------------------------------------------------------------------------- # GITEA — SHARED CREDENTIALS (used on both Unraid + Fedora instances) # ----------------------------------------------------------------------------- @@ -53,7 +69,7 @@ ACT_RUNNER_VERSION=0.3.0 # act_runner version for all runners (e.g. 0.3 # GITEA — PRIMARY INSTANCE (Unraid) # ----------------------------------------------------------------------------- GITEA_DOMAIN= # Public domain/subdomain pointing to Unraid (e.g. git.yourdomain.com) -GITEA_INTERNAL_URL= # Internal URL (e.g. http://UNRAID_IP:3000) used by scripts +GITEA_INTERNAL_URL= # Internal URL (e.g. http://UNRAID_GITEA_IP:3000) used by scripts # AUTO-POPULATED by phase1 scripts: GITEA_ADMIN_TOKEN= # API token for primary instance — do not fill manually @@ -61,7 +77,7 @@ GITEA_ADMIN_TOKEN= # API token for primary instance — do not fi # ----------------------------------------------------------------------------- # GITEA — BACKUP INSTANCE (Fedora) # ----------------------------------------------------------------------------- -GITEA_BACKUP_INTERNAL_URL= # Internal URL of Fedora Gitea (e.g. http://FEDORA_IP:3000) +GITEA_BACKUP_INTERNAL_URL= # Internal URL of Fedora Gitea (e.g. http://FEDORA_GITEA_IP:3000) GITEA_BACKUP_MIRROR_INTERVAL=8h # How often Fedora pulls from Unraid (e.g. 8h, 24h) BACKUP_STORAGE_PATH= # Absolute path on Fedora for backup archives (e.g. /mnt/nvme/gitea-backups) BACKUP_RETENTION_COUNT=5 # Number of backup archives to keep (older ones are pruned)