From e41245d2e758bce2a404749398bef89998638561 Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Fri, 9 Aug 2024 13:21:18 +0000
Subject: [PATCH] fix(docker-image): clear cache to account for new assets and
 data structure changes

fixes #510
---
 docker/production/common/prepare_environment.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docker/production/common/prepare_environment.sh b/docker/production/common/prepare_environment.sh
index 64f7efbd1c..a27773d0a7 100644
--- a/docker/production/common/prepare_environment.sh
+++ b/docker/production/common/prepare_environment.sh
@@ -288,5 +288,8 @@ cat $ENV_FILE_LOCATION
 #Run database migrations after 10 seconds (to wait for the database to be started)
 (sleep 10 && php spark castopod:database-update) &
 
+# clear cache to account for new assets and any change in data structure
+php spark cache:clear
+
 #Apply php configuration
 cat /uploads.template.ini | envsubst '$CP_MAX_BODY_SIZE$CP_MAX_BODY_SIZE_BYTES$CP_TIMEOUT$CP_PHP_MEMORY_LIMIT' > /usr/local/etc/php/conf.d/uploads.ini
-- 
GitLab