From a39c92a97f2a2fc60ac0f74212801f7dd3ca8312 Mon Sep 17 00:00:00 2001 From: Moctar Date: Thu, 13 Jun 2024 15:39:50 +0200 Subject: [PATCH 1/2] PHRAS-4056 -fix non escaped path error in sed --- docker/phraseanet/worker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/phraseanet/worker/entrypoint.sh b/docker/phraseanet/worker/entrypoint.sh index afe92889d5..1f282aa09a 100755 --- a/docker/phraseanet/worker/entrypoint.sh +++ b/docker/phraseanet/worker/entrypoint.sh @@ -67,7 +67,7 @@ if [ -f /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml ]; the sed -i "s/domain=\"resource\" name=\"height\" value=\".*\"/domain=\"resource\" name=\"height\" value=\"$IMAGEMAGICK_POLICY_HEIGHT\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml sed -i "s/domain=\"resource\" name=\"disk\" value=\".*\"/domain=\"resource\" name=\"disk\" value=\"$IMAGEMAGICK_POLICY_DISK\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml sed -i "s/domain=\"resource\" name=\"area\" value=\".*\"/domain=\"resource\" name=\"area\" value=\"$IMAGEMAGICK_POLICY_AREA\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml - sed -i "s/.*domain=\"resource\" name=\"temporary-path\" value=\".*//g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml + sed -i "s/.*domain=\"resource\" name=\"temporary-path\" value=\".*//g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml fi if [[ $NEWRELIC_ENABLED = "true" ]]; then From f569ec455c9f6d5da8722b3dfe4a2ff12ca641e3 Mon Sep 17 00:00:00 2001 From: Moctar Date: Thu, 13 Jun 2024 17:14:47 +0200 Subject: [PATCH 2/2] PHRAS-4056 add ImageMagick variables to CMD container --- docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index d537d9d812..e5914218fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1356,6 +1356,14 @@ services: - PHRASEANET_CMD_MODE - PHRASEANET_EXPLODE_WORKER - PHRASEANET_WORKERS_LAUNCH_METHOD + - IMAGEMAGICK_POLICY_VERSION + - IMAGEMAGICK_POLICY_WIDTH + - IMAGEMAGICK_POLICY_HEIGHT + - IMAGEMAGICK_POLICY_MAP + - IMAGEMAGICK_POLICY_MEMORY + - IMAGEMAGICK_POLICY_AREA + - IMAGEMAGICK_POLICY_DISK + - IMAGEMAGICK_POLICY_TEMPORARY_PATH - NEWRELIC_ENABLED - NEWRELIC_LICENSE_KEY - NEWRELIC_APP_NAME