🐛 fix(docker): remove pre-compressed config files at runtime

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 <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-16 04:43:11 +01:00
parent c5ffd92bad
commit bdbe66d2df
5 changed files with 25 additions and 0 deletions

View file

@ -22,5 +22,10 @@ EOF
echo "✅ Configuration generated at /app/apps/calendar/apps/web/build/client/config.json" echo "✅ Configuration generated at /app/apps/calendar/apps/web/build/client/config.json"
cat /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..." echo "🚀 Starting Calendar web app..."
exec "$@" exec "$@"

View file

@ -22,5 +22,10 @@ EOF
echo "✅ Configuration generated at /app/apps/chat/apps/web/build/client/config.json" echo "✅ Configuration generated at /app/apps/chat/apps/web/build/client/config.json"
cat /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..." echo "🚀 Starting Chat web app..."
exec "$@" exec "$@"

View file

@ -22,5 +22,10 @@ EOF
echo "✅ Configuration generated at /app/apps/clock/apps/web/build/client/config.json" echo "✅ Configuration generated at /app/apps/clock/apps/web/build/client/config.json"
cat /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..." echo "🚀 Starting Clock web app..."
exec "$@" exec "$@"

View file

@ -22,5 +22,10 @@ EOF
echo "✅ Configuration generated at /app/apps/contacts/apps/web/build/client/config.json" echo "✅ Configuration generated at /app/apps/contacts/apps/web/build/client/config.json"
cat /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..." echo "🚀 Starting Contacts web app..."
exec "$@" exec "$@"

View file

@ -33,6 +33,11 @@ EOF
echo "✅ Runtime configuration generated:" echo "✅ Runtime configuration generated:"
cat build/client/config.json 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 ""
echo "🚀 Starting Node server..." echo "🚀 Starting Node server..."