From bdbe66d2df6a73789aeca385e0ee331e1f64d7f4 Mon Sep 17 00:00:00 2001 From: Wuesteon Date: Tue, 16 Dec 2025 04:43:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(docker):=20remove=20pre-comp?= =?UTF-8?q?ressed=20config=20files=20at=20runtime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SvelteKit pre-compresses static files (config.json.br, config.json.gz) during build. When docker-entrypoint.sh regenerates config.json at runtime, the server still serves the stale compressed versions. This fix removes the .br and .gz files after generating the fresh config.json, ensuring browsers receive the correct runtime configuration. Affected apps: calendar, chat, clock, contacts, manacore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- apps/calendar/apps/web/docker-entrypoint.sh | 5 +++++ apps/chat/apps/web/docker-entrypoint.sh | 5 +++++ apps/clock/apps/web/docker-entrypoint.sh | 5 +++++ apps/contacts/apps/web/docker-entrypoint.sh | 5 +++++ apps/manacore/apps/web/docker-entrypoint.sh | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/apps/calendar/apps/web/docker-entrypoint.sh b/apps/calendar/apps/web/docker-entrypoint.sh index 455ffc64b..df8e2168d 100644 --- a/apps/calendar/apps/web/docker-entrypoint.sh +++ b/apps/calendar/apps/web/docker-entrypoint.sh @@ -22,5 +22,10 @@ EOF echo "✅ Configuration generated at /app/apps/calendar/apps/web/build/client/config.json" cat /app/apps/calendar/apps/web/build/client/config.json +# Remove pre-compressed versions (SvelteKit serves these instead of the raw file) +rm -f /app/apps/calendar/apps/web/build/client/config.json.br +rm -f /app/apps/calendar/apps/web/build/client/config.json.gz +echo "🗑️ Removed stale pre-compressed config files" + echo "🚀 Starting Calendar web app..." exec "$@" diff --git a/apps/chat/apps/web/docker-entrypoint.sh b/apps/chat/apps/web/docker-entrypoint.sh index 5a703b786..caeac21b2 100644 --- a/apps/chat/apps/web/docker-entrypoint.sh +++ b/apps/chat/apps/web/docker-entrypoint.sh @@ -22,5 +22,10 @@ EOF echo "✅ Configuration generated at /app/apps/chat/apps/web/build/client/config.json" cat /app/apps/chat/apps/web/build/client/config.json +# Remove pre-compressed versions (SvelteKit serves these instead of the raw file) +rm -f /app/apps/chat/apps/web/build/client/config.json.br +rm -f /app/apps/chat/apps/web/build/client/config.json.gz +echo "🗑️ Removed stale pre-compressed config files" + echo "🚀 Starting Chat web app..." exec "$@" diff --git a/apps/clock/apps/web/docker-entrypoint.sh b/apps/clock/apps/web/docker-entrypoint.sh index dab2ca2f0..8eb1ee772 100644 --- a/apps/clock/apps/web/docker-entrypoint.sh +++ b/apps/clock/apps/web/docker-entrypoint.sh @@ -22,5 +22,10 @@ EOF echo "✅ Configuration generated at /app/apps/clock/apps/web/build/client/config.json" cat /app/apps/clock/apps/web/build/client/config.json +# Remove pre-compressed versions (SvelteKit serves these instead of the raw file) +rm -f /app/apps/clock/apps/web/build/client/config.json.br +rm -f /app/apps/clock/apps/web/build/client/config.json.gz +echo "🗑️ Removed stale pre-compressed config files" + echo "🚀 Starting Clock web app..." exec "$@" diff --git a/apps/contacts/apps/web/docker-entrypoint.sh b/apps/contacts/apps/web/docker-entrypoint.sh index 12ecfe6d3..e8f9427a4 100644 --- a/apps/contacts/apps/web/docker-entrypoint.sh +++ b/apps/contacts/apps/web/docker-entrypoint.sh @@ -22,5 +22,10 @@ EOF echo "✅ Configuration generated at /app/apps/contacts/apps/web/build/client/config.json" cat /app/apps/contacts/apps/web/build/client/config.json +# Remove pre-compressed versions (SvelteKit serves these instead of the raw file) +rm -f /app/apps/contacts/apps/web/build/client/config.json.br +rm -f /app/apps/contacts/apps/web/build/client/config.json.gz +echo "🗑️ Removed stale pre-compressed config files" + echo "🚀 Starting Contacts web app..." exec "$@" diff --git a/apps/manacore/apps/web/docker-entrypoint.sh b/apps/manacore/apps/web/docker-entrypoint.sh index 9ab2a028e..cfcc3c580 100755 --- a/apps/manacore/apps/web/docker-entrypoint.sh +++ b/apps/manacore/apps/web/docker-entrypoint.sh @@ -33,6 +33,11 @@ EOF echo "✅ Runtime configuration generated:" cat build/client/config.json +# Remove pre-compressed versions (SvelteKit serves these instead of the raw file) +rm -f build/client/config.json.br +rm -f build/client/config.json.gz +echo "🗑️ Removed stale pre-compressed config files" + echo "" echo "🚀 Starting Node server..."