diff --git a/templates/compose.yaml b/templates/compose.yaml index 33fc811..febb74b 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -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: