From e444e67215343ed3015b4cf5df6268e80fbdb36f Mon Sep 17 00:00:00 2001 From: gjacobjn <52928254+gjacobjn@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:31:45 +0200 Subject: [PATCH 1/6] Update .env --- .env | 1 + 1 file changed, 1 insertion(+) diff --git a/.env b/.env index 191754107f..b18d09366e 100644 --- a/.env +++ b/.env @@ -34,6 +34,7 @@ PHP_LOG_LEVEL=warning # These variables are used in the configuration.yml . # set here the first user / email couple +PHRASEANET_ADMIN_ACCOUNT_ID=1 PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly # Database parameters From 2b61f1963fbaf801e2f85d04d95e5a05c9220c82 Mon Sep 17 00:00:00 2001 From: gjacobjn <52928254+gjacobjn@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:33:45 +0200 Subject: [PATCH 2/6] Update docker-compose.yml --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 34ec5133dd..1f906e4cb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,6 +43,7 @@ services: - OPCACHE_ENABLED - SESSION_CACHE_LIMITER - PHP_LOG_LEVEL + - PHRASEANET_ADMIN_ACCOUNT_ID - PHRASEANET_ADMIN_ACCOUNT_EMAIL - PHRASEANET_ADMIN_ACCOUNT_PASSWORD - PHRASEANET_DB_HOST From b647f172286837bea97dfeed1401c7fb92142069 Mon Sep 17 00:00:00 2001 From: gjacobjn <52928254+gjacobjn@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:37:36 +0200 Subject: [PATCH 3/6] Update entrypoint.sh --- docker/phraseanet/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index 74757c3a26..ed23d9d253 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -32,8 +32,8 @@ if [ -f "$FILE" ]; then bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX fi - if [[ $PHRASEANET_ADMIN_ACCOUNT_PASSWORD ]]; then - bin/console user:password --user_id=1 --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y + if [[ $PHRASEANET_ADMIN_ACCOUNT_ID && $PHRASEANET_ADMIN_ACCOUNT_ID =~ ^[0-9]+$ ]]; then + bin/console user:password --user_id=$PHRASEANET_ADMIN_ACCOUNT_ID --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y fi else From 7b4e82a487c7f407b0f4d183bb6b29262531b5ee Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Mon, 6 Jul 2020 13:24:14 +0200 Subject: [PATCH 4/6] Update .env --- .env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index b18d09366e..d43441b99b 100644 --- a/.env +++ b/.env @@ -34,7 +34,8 @@ PHP_LOG_LEVEL=warning # These variables are used in the configuration.yml . # set here the first user / email couple -PHRASEANET_ADMIN_ACCOUNT_ID=1 +#set to id of phraseanet root account, if you want activate a sync for phraseanet root account password from env value. +PHRASEANET_ADMIN_ACCOUNT_ID= PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly # Database parameters From 4cf43797b9a6df846dc18522d5556e354c5af8d6 Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Mon, 6 Jul 2020 13:25:13 +0200 Subject: [PATCH 5/6] Update .env --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index d43441b99b..b151a9a7d7 100644 --- a/.env +++ b/.env @@ -34,7 +34,7 @@ PHP_LOG_LEVEL=warning # These variables are used in the configuration.yml . # set here the first user / email couple -#set to id of phraseanet root account, if you want activate a sync for phraseanet root account password from env value. +#set to id of Phraseanet root account, if you want activate a sync for Phraseanet root account password provide by PHRASEANET_ADMIN_ACCOUNT_PASSWORD env value. PHRASEANET_ADMIN_ACCOUNT_ID= PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly From 7e5f020703d5626438393eb88cfc3fdb919cdcbc Mon Sep 17 00:00:00 2001 From: gjacobjn <52928254+gjacobjn@users.noreply.github.com> Date: Mon, 6 Jul 2020 16:21:50 +0200 Subject: [PATCH 6/6] Fix for PHRASEANET_ADMIN_ACCOUNT_ID not set Fix condition when PHRASEANET_ADMIN_ACCOUNT_ID is not set in :env --- docker/phraseanet/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index ed23d9d253..c7db40255f 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -32,7 +32,7 @@ if [ -f "$FILE" ]; then bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX fi - if [[ $PHRASEANET_ADMIN_ACCOUNT_ID && $PHRASEANET_ADMIN_ACCOUNT_ID =~ ^[0-9]+$ ]]; then + if [[ -n ${PHRASEANET_ADMIN_ACCOUNT_ID} && $PHRASEANET_ADMIN_ACCOUNT_ID =~ ^[0-9]+$ ]]; then bin/console user:password --user_id=$PHRASEANET_ADMIN_ACCOUNT_ID --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y fi