From 8ccb88503a75b4998a95b16a8a5d2dff0201b5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 18 Apr 2026 01:00:36 +0200 Subject: [PATCH] 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. --- templates/compose.yaml | 2 +- templates/config/prod/messenger.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/compose.yaml b/templates/compose.yaml index 3625997..5f4691b 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -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: diff --git a/templates/config/prod/messenger.yaml b/templates/config/prod/messenger.yaml index c66af65..8859c0a 100644 --- a/templates/config/prod/messenger.yaml +++ b/templates/config/prod/messenger.yaml @@ -18,4 +18,4 @@ framework: priority: 'doctrine://default' {% endif +%} failed: 'doctrine://default?queue_name=failed' - sync: 'sync://' \ No newline at end of file + sync: 'sync://'