From 1aed12bf00a7843eee2168c2c8520ca32d5f3316 Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Sun, 24 May 2026 05:10:13 +0200 Subject: [PATCH] fix(compose): scope upstream spoof aliases to mirror mode The spoof aliases (maven.neoforged.net, libraries.minecraft.net, etc.) hijacked those hostnames for every mcnet container, so the ONLINE NeoForge install during pre-bake hit the empty mirror (cert path failure). Moved them to the mirror override; core/static modes resolve the real upstreams. Co-Authored-By: Claude Opus 4.7 (1M context) --- docker-compose.mirror.yml | 13 +++++++++++++ docker-compose.yml | 13 ++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docker-compose.mirror.yml b/docker-compose.mirror.yml index 77d46ee..eb12abe 100644 --- a/docker-compose.mirror.yml +++ b/docker-compose.mirror.yml @@ -10,3 +10,16 @@ services: volumes: - ./caddy/conf.d/20-mirror.caddy:/etc/caddy/conf.d/20-mirror.caddy:ro - ./mirror/upstream:/srv/mirror:ro + networks: + mcnet: + # Spoof the real upstream hosts -> Caddy (air-gap runtime only). Includes + # the base aliases because compose replaces (not merges) the alias list. + aliases: + - "auth.${BASE_DOMAIN}" + - "packwiz.${BASE_DOMAIN}" + - "meta.prismlauncher.org" + - "piston-meta.mojang.com" + - "piston-data.mojang.com" + - "libraries.minecraft.net" + - "maven.neoforged.net" + - "resources.download.minecraft.net" diff --git a/docker-compose.yml b/docker-compose.yml index 2a612ca..ddf54c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,18 +45,13 @@ services: - ./pack:/srv/pack:ro networks: mcnet: - # All subdomain aliases live here (harmless when a vhost snippet isn't - # mounted; lets internal containers resolve them to Caddy). The spoof - # hosts only actually serve content when the mirror snippet is present. + # Only the stack's own subdomains in the base. The upstream spoof-host + # aliases live in docker-compose.mirror.yml — adding them here would + # hijack maven.neoforged.net / libraries.minecraft.net for ALL mcnet + # containers, breaking the ONLINE NeoForge install during pre-bake. aliases: - "auth.${BASE_DOMAIN}" - "packwiz.${BASE_DOMAIN}" - - "meta.prismlauncher.org" - - "piston-meta.mojang.com" - - "piston-data.mojang.com" - - "libraries.minecraft.net" - - "maven.neoforged.net" - - "resources.download.minecraft.net" drasl: image: unmojang/drasl:latest