From 87baf8bb118733fd4e84815c79c47f1b394cbcef Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Tue, 16 Dec 2025 18:30:07 +0100 Subject: [PATCH] Update entrypoint to always sync static assets (not only new ones) --- CHANGELOG.md | 1 + docker/web-entrypoint.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b39b1b2..e724b47f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixed - Fixed a bug preventing the app to start if a composite index on stats table already exists. #2034 +- New compiled assets will override old ones on app start to prevent serving stale assets. # [0.36.3] - 2025-12-14 diff --git a/docker/web-entrypoint.sh b/docker/web-entrypoint.sh index 8785446b..5d1f7143 100644 --- a/docker/web-entrypoint.sh +++ b/docker/web-entrypoint.sh @@ -35,10 +35,10 @@ export DATABASE_NAME rm -f $APP_PATH/tmp/pids/server.pid # Sync static assets from image to volume -# This ensures new files (like maps_maplibre styles) are copied to the persistent volume +# This ensures new and updated files are copied to the persistent volume if [ -d "/tmp/public_assets" ]; then - echo "📦 Syncing new static assets to public volume..." - cp -rn /tmp/public_assets/* $APP_PATH/public/ 2>/dev/null || true + echo "📦 Syncing static assets to public volume..." + cp -ru /tmp/public_assets/* $APP_PATH/public/ 2>/dev/null || true echo "✅ Static assets synced!" fi