refactor(pack): host custom jars from ./custom outside the pack root
Move pack/custom/ -> ./custom/ and bind-mount it into caddy at
/srv/pack/custom (served URL pack.${BASE_DOMAIN}/custom/ unchanged).
Keeping jars outside the packwiz pack root stops `packwiz refresh`
from indexing them as direct files on top of the mods/*.pw.toml
external refs (drops 9 bogus custom/*.jar entries from index.toml).
add-custom-mod.sh now writes jars to ./custom/. Trim the blessingskin
caddy override to just the conf swap (volumes merge by target).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
58f0312018
commit
c40cbe7594
14 files changed
+16
-47
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -26,12 +26,12 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
# Swap the core ingress conf for the Blessing Skin one (same mount target,
|
# Swap the core ingress conf for the Blessing Skin one. Compose MERGES
|
||||||
# so it shadows the base 00-core.caddy). volumes is a full replacement here.
|
# volumes by container path, so mounting the BSS conf at the SAME target
|
||||||
|
# (/etc/caddy/conf.d/00-core.caddy) shadows the base 00-core.caddy; all
|
||||||
|
# other base mounts (pack, custom, static, ca) are kept automatically.
|
||||||
volumes:
|
volumes:
|
||||||
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
||||||
- ./caddy/conf.d/00-core-blessingskin.caddy:/etc/caddy/conf.d/00-core.caddy:ro
|
- ./caddy/conf.d/00-core-blessingskin.caddy:/etc/caddy/conf.d/00-core.caddy:ro
|
||||||
- ./pack:/srv/pack:ro
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- blessing-skin
|
- blessing-skin
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ services:
|
|||||||
- ./mirror/launcher:/srv/launcher:ro
|
- ./mirror/launcher:/srv/launcher:ro
|
||||||
- ./caddy/caddy-root-ca.crt:/srv/ca-pub/ca.crt:ro
|
- ./caddy/caddy-root-ca.crt:/srv/ca-pub/ca.crt:ro
|
||||||
- ./pack:/srv/pack:ro
|
- ./pack:/srv/pack:ro
|
||||||
|
# Custom (locally-hosted) mod jars live OUTSIDE ./pack so packwiz refresh
|
||||||
|
# doesn't index them as direct files — they're external download targets
|
||||||
|
# referenced by pack/mods/*.pw.toml. Served at pack.${BASE_DOMAIN}/custom/.
|
||||||
|
- ./custom:/srv/pack/custom:ro
|
||||||
networks:
|
networks:
|
||||||
mcnet:
|
mcnet:
|
||||||
# Only the stack's own subdomains in the base. The upstream spoof-host
|
# Only the stack's own subdomains in the base. The upstream spoof-host
|
||||||
|
|||||||
+1
-37
@@ -2,48 +2,12 @@ hash-format = "sha256"
|
|||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "CustomSkinLoader/CustomSkinLoader.json"
|
file = "CustomSkinLoader/CustomSkinLoader.json"
|
||||||
hash = "e90635e0074cc7b1ddee50ddd2af8a4b35842ab721878665b00a3612ad01105b"
|
hash = "20f015b837d4178cc1ba6ca074e746dea91b2b97810587bae0fc4e55cf98b1aa"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "README.md"
|
file = "README.md"
|
||||||
hash = "3915be75668def5a70667584c7aebdc1ee9a7f7dd9479cb10fb174aad40a6b4e"
|
hash = "3915be75668def5a70667584c7aebdc1ee9a7f7dd9479cb10fb174aad40a6b4e"
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/CustomSkinLoader_Universal-14.28.jar"
|
|
||||||
hash = "0008fb0a91dd1e84d52162cfe96addb5f6aed3b76d426ea7305d7624e31f1894"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/Jade-1.21.1-NeoForge-15.10.5.jar"
|
|
||||||
hash = "067bb4b007e1d6f6b79f0afe99c91252aa825472b99a76d33a60d24442f9e92d"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/JadeAddons-1.21.1-NeoForge-6.1.0.jar"
|
|
||||||
hash = "5f242668ad710092964d4d9afda8a94fa2401665ea13eea67d55d07e4dff8a64"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/JustEnoughProfessions-neoforge-1.21.1-4.0.5.jar"
|
|
||||||
hash = "b320b47f1791f56df9e1a05138f0e312e6e54541945ff15f2f1fd398cd1d4d9d"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/JustEnoughResources-NeoForge-1.21.1-1.6.0.17.jar"
|
|
||||||
hash = "7a47d69b5530704690d5a5f0726cd74a2d6c57df17dd4a8589c4ab5212f91460"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/MouseTweaks-neoforge-mc1.21-2.26.1.jar"
|
|
||||||
hash = "68e6f4201c5de97b77929a7215c9552495696ca6a3bf3ae4eacc34e135f6cc8b"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/balm-neoforge-1.21.1-21.0.58.jar"
|
|
||||||
hash = "aa2463747bad4c2351869226ea7bce7839510dfd2ac387f8d1588b1ce9309c67"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/inventoryessentials-neoforge-1.21.1-21.1.15.jar"
|
|
||||||
hash = "b7a5c5526a45256551543419ba2b5d54e56c585d76a645a8cea8cb8ea843ae2c"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "custom/jei-1.21.1-neoforge-19.27.0.340.jar"
|
|
||||||
hash = "8aaf547432f1b4958239b036356b910692fe40f858c3073d996f56bbf7c99826"
|
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "mods/balm-neoforge-1-21-1-21-0-58.pw.toml"
|
file = "mods/balm-neoforge-1-21-1-21-0-58.pw.toml"
|
||||||
hash = "4d04516cc66ac6f29d6d1ae16bfd89217f21d842858ace5bcae1e402da5da0e2"
|
hash = "4d04516cc66ac6f29d6d1ae16bfd89217f21d842858ace5bcae1e402da5da0e2"
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
|
|||||||
[index]
|
[index]
|
||||||
file = "index.toml"
|
file = "index.toml"
|
||||||
hash-format = "sha256"
|
hash-format = "sha256"
|
||||||
hash = "64c69b2e38fcf389a3de38d240aa95e8309ac60e717c1fe994aef2c4a2684921"
|
hash = "2707ae674c7c75371b97cc378ca72abc36bbb513b7db238db111f88a13aa6039"
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
minecraft = "1.21.1"
|
minecraft = "1.21.1"
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
# <slug>.pw.toml that points at a stable download URL + sha256, then refresh.
|
# <slug>.pw.toml that points at a stable download URL + sha256, then refresh.
|
||||||
#
|
#
|
||||||
# Since the jars are local (no public URL), we HOST them on the caddy pack
|
# Since the jars are local (no public URL), we HOST them on the caddy pack
|
||||||
# server: each jar is copied under pack/custom/ — caddy serves pack/ at
|
# server: each jar is copied to the top-level ./custom/ dir (OUTSIDE ./pack, so
|
||||||
# http://pack.${BASE_DOMAIN}/ — so the metadata's download url is
|
# packwiz refresh won't index it as a direct file). Caddy bind-mounts ./custom
|
||||||
|
# at /srv/pack/custom, so it is served at
|
||||||
# http://pack.${BASE_DOMAIN}/custom/<filename>
|
# http://pack.${BASE_DOMAIN}/custom/<filename>
|
||||||
# which is exactly what minecraft fetches via PACKWIZ_URL on install.
|
# which is exactly what minecraft fetches via PACKWIZ_URL on install.
|
||||||
#
|
#
|
||||||
@@ -73,7 +74,7 @@ else
|
|||||||
JARS=("$TARGET")
|
JARS=("$TARGET")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p pack/custom pack/mods
|
mkdir -p custom pack/mods
|
||||||
|
|
||||||
# ---- per-jar processing (no refresh; refresh once at the end) --------------
|
# ---- per-jar processing (no refresh; refresh once at the end) --------------
|
||||||
add_one() { # $1 = jar path. Uses NAME (single-jar only), SIDE, FORCE, BASE_DOMAIN.
|
add_one() { # $1 = jar path. Uses NAME (single-jar only), SIDE, FORCE, BASE_DOMAIN.
|
||||||
@@ -88,7 +89,7 @@ add_one() { # $1 = jar path. Uses NAME (single-jar only), SIDE, FORCE, BASE_DOM
|
|||||||
[ -n "$slug" ] || die "could not derive a slug from name '$name'"
|
[ -n "$slug" ] || die "could not derive a slug from name '$name'"
|
||||||
|
|
||||||
meta="pack/mods/${slug}.pw.toml"
|
meta="pack/mods/${slug}.pw.toml"
|
||||||
dest="pack/custom/${filename}"
|
dest="custom/${filename}"
|
||||||
url="http://pack.${BASE_DOMAIN}/custom/${filename}"
|
url="http://pack.${BASE_DOMAIN}/custom/${filename}"
|
||||||
|
|
||||||
if [ "$FORCE" -ne 1 ]; then
|
if [ "$FORCE" -ne 1 ]; then
|
||||||
@@ -119,4 +120,4 @@ for j in "${JARS[@]}"; do add_one "$j"; done
|
|||||||
# .pw.toml files are picked up. Must run inside the pack dir.
|
# .pw.toml files are picked up. Must run inside the pack dir.
|
||||||
( cd pack && packwiz refresh )
|
( cd pack && packwiz refresh )
|
||||||
log "packwiz refresh done — ${#JARS[@]} mod(s) added to the pack"
|
log "packwiz refresh done — ${#JARS[@]} mod(s) added to the pack"
|
||||||
echo " commit pack/custom/*.jar, pack/mods/*.pw.toml, pack/index.toml, pack/pack.toml"
|
echo " commit custom/*.jar, pack/mods/*.pw.toml, pack/index.toml, pack/pack.toml"
|
||||||
Reference in new issue
Block a user