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