Set CLEAR_CACHE environment variable and update consumer command in compose.yaml

This commit is contained in:
2025-09-11 11:01:39 +02:00
parent 7805b074f0
commit d1cf7d363a

View File

@@ -46,6 +46,8 @@ services:
consumer:
<<: *defaultApp
entrypoint: "/usr/bin/env"
environment:
CLEAR_CACHE: "false" # pre-generating the cache cause issue with permissions on the cache directory.
command:
- "/bin/bash"
- "-c"
@@ -53,12 +55,7 @@ services:
sleep 3 && bin/console cache:clear &&
while ! [ -f /tmp/kill_me ];
do
su -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "$PHP_FPM_USER";
rc=$?;
if [ $rc -ne 0 ]; then
echo "Consumer exited with status $rc. Stopping container.";
exit $rc;
fi
su -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data";
done;
pre_stop:
- command: