diff --git a/create_pod_espocrm.sh b/create_pod_espocrm.sh index 032b6c7..20749e7 100755 --- a/create_pod_espocrm.sh +++ b/create_pod_espocrm.sh @@ -103,6 +103,17 @@ for i in $(seq 1 90); do done echo "EspoCRM responded with HTTP $code (rc=$?)" +# Rebuild EspoCRM cache so customizations on the persisted bind-mount take effect +# and the client cacheTimestamp is bumped (forces browsers to reload custom views, +# e.g. custom field views like the signature image button). The image entrypoint +# does NOT rebuild on a normal same-version restart, so without this a recreate +# keeps serving a stale client cache. Done here in the live phase where the DB is +# already confirmed up (the systemd-managed phase has a start-up race on the DB). +# The bumped cacheTimestamp and rebuilt cache persist on the bind-mount into the +# systemd-managed instance. +podman exec -u www-data "$WEB_CTR" php command.php rebuild +echo "Rebuilt EspoCRM cache (rc=$?)" + # EspoCRM scheduler/daemon container (start last; reads data/config.php) podman rm -f "$DAEMON_CTR" podman run -d --name "$DAEMON_CTR" --pod "$POD_NAME" \