From 1f1d3b901ec921cf602fc35e2f6b85ab05a442bd Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Wed, 8 Mar 2023 17:30:33 +0100 Subject: [PATCH] PHRAS-3821 chown re-organistion between setup and fpm and worker- wip (#4261) PHRAS-3821 : chown are now only executed by "setup" container --- docker/phraseanet/fpm/entrypoint.sh | 14 +++++++------- docker/phraseanet/setup/entrypoint.sh | 24 +++++++++++++++++------- docker/phraseanet/worker/entrypoint.sh | 15 ++++++++------- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/docker/phraseanet/fpm/entrypoint.sh b/docker/phraseanet/fpm/entrypoint.sh index 0e67b73aea..90f0b601a3 100755 --- a/docker/phraseanet/fpm/entrypoint.sh +++ b/docker/phraseanet/fpm/entrypoint.sh @@ -41,15 +41,15 @@ fi ./docker/phraseanet/plugins/console init -rm -Rf cache/* +# rm -Rf cache/* -chown -R app:app \ - cache \ - config \ - tmp \ - logs \ - www +#chown -R app:app \ +# cache \ +# config \ +# tmp \ +# logs \ +# www if [ -d "plugins/" ];then diff --git a/docker/phraseanet/setup/entrypoint.sh b/docker/phraseanet/setup/entrypoint.sh index 4e52196d64..693b37017d 100755 --- a/docker/phraseanet/setup/entrypoint.sh +++ b/docker/phraseanet/setup/entrypoint.sh @@ -201,23 +201,33 @@ if [[ -f "$FILE" && $PHRASEANET_SETUP = 1 ]]; then echo `date +"%Y-%m-%d %H:%M:%S"` " - config/configuration.yml update by Phraseanet entrypoint.sh Finished !" fi +echo `date +"%Y-%m-%d %H:%M:%S"` " - Init plugin install " ./docker/phraseanet/plugins/console init + +echo `date +"%Y-%m-%d %H:%M:%S"` " - Flushing application cache" rm -Rf cache/* +echo `date +"%Y-%m-%d %H:%M:%S"` " - chown APP:APP on cache/ repositorie" +chown -R app:app cache -chown -R app:app \ - cache \ - config \ - tmp \ - logs \ - www +echo `date +"%Y-%m-%d %H:%M:%S"` " - chown APP:APP on config/ repositorie" +chown -R app:app config + +echo `date +"%Y-%m-%d %H:%M:%S"` " - chown APP:APP on tmp/ repositorie" +chown -R app:app tmp + +echo `date +"%Y-%m-%d %H:%M:%S"` " - chown APP:APP on logs/ repositorie" +chown -R app:app logs + +echo `date +"%Y-%m-%d %H:%M:%S"` " - chown APP:APP on www/ repositorie" +chown -R app:app www +echo `date +"%Y-%m-%d %H:%M:%S"` " - End of chown!" if [ -d "plugins/" ];then chown -R app:app plugins; fi -#chown -R app:app datas && echo `date +"%Y-%m-%d %H:%M:%S"` " - Finished chown on datas by entrypoint" & echo `date +"%Y-%m-%d %H:%M:%S"` " - End of Phraseanet setup entrypoint.sh" if [[ $PHRASEANET_MAINTENANCE = 2 ]];then diff --git a/docker/phraseanet/worker/entrypoint.sh b/docker/phraseanet/worker/entrypoint.sh index 773ef5bbc1..70b5219f5b 100755 --- a/docker/phraseanet/worker/entrypoint.sh +++ b/docker/phraseanet/worker/entrypoint.sh @@ -21,15 +21,16 @@ if [ ${XDEBUG_ENABLED} == "1" ]; then fi ./docker/phraseanet/plugins/console init -rm -Rf cache/* + +# rm -Rf cache/* -chown -R app:app \ - cache \ - config \ - tmp \ - logs \ - www +#chown -R app:app \ +# cache \ +# config \ +# tmp \ +# logs \ +# www if [ -d "plugins/" ];then