Update messenger consumer shell command for preserved environment variables

Replaced `su` with `su -p` in `compose.yaml` to ensure the environment variables of the parent shell are preserved when running the messenger consumer.
This commit is contained in:
2026-04-18 01:00:36 +02:00
parent 3f99ea7fcd
commit 8ccb88503a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,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' "www-data";
su -p -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:
+1 -1
View File
@@ -18,4 +18,4 @@ framework:
priority: 'doctrine://default'
{% endif +%}
failed: 'doctrine://default?queue_name=failed'
sync: 'sync://'
sync: 'sync://'