From e109d3c365b1583407d9cd1ed9fcc2bd31b8b994 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Thu, 30 Apr 2020 22:54:43 +0200 Subject: [PATCH 01/24] PHRAS-3049 #comment auto-install reorganisation, more environement variable for mail configuration and http api setting --- .env | 19 +++++++++++++++++- docker/phraseanet/auto-install.sh | 33 +++++++++++++++++++------------ 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.env b/.env index 1f3824846a..5996e11791 100644 --- a/.env +++ b/.env @@ -14,7 +14,7 @@ MYSQL_ROOT_PASSWORD=root SERVER_NAME=phraseanet-docker -# --------------- APPLICATION CONFIGURATION -------------------- +# --------------- PHP CONFIGURATION -------------------- # Max upload size MAX_BODY_SIZE=2G @@ -49,6 +49,23 @@ INSTALL_SERVER_NAME=localhost # Mysql max allowed packet MYSQL_MAX_ALLOWED_PACKET=16M +# --------------- APPLICATION CONFIGURATION -------------------- + +# api +PHRASEANET_API_ENABLED=true +PHRASEANET_API_SSL=true + +# Phraseanet mail configuration +PHRASEANET_EMITTER_EMAIL=phraseanet@example.com +PHRASEANET_MAIL_OBJECT_PREFIX= +PHRASEANET_SMTP_ENABLED=false +PHRASEANET_SMTP_HOST= +PHRASEANET_SMTP_PORT= +PHRASEANET_SMTP_AUTH_ENABLED=false +PHRASEANET_SMTP_SECURE_MODE=tls +PHRASEANET_SMTP_USER= +PHRASEANET_SMTP_PASSWORD= + # --- DEV purpose --- diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index c408f4aafa..c68c080036 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,6 +25,17 @@ fi --server-name=$INSTALL_SERVER_NAME \ --data-path=/var/alchemy/Phraseanet/datas -y + # Bus configuration for scheduler & worker +bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry +bin/setup system:config set workers.queue.worker-queue.host rabbitmq +bin/setup system:config set workers.queue.worker-queue.port 5672 +bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER +bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD +bin/setup system:config set workers.queue.worker-queue.vhost / + +/var/alchemy/Phraseanet/bin/console compile:configuration + + /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 @@ -38,22 +49,18 @@ fi /var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME /var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis -# Bus configuration for scheduler & worker -bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry -bin/setup system:config set workers.queue.worker-queue.host rabbitmq -bin/setup system:config set workers.queue.worker-queue.port 5672 -bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER -bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD -bin/setup system:config set workers.queue.worker-queue.vhost / - -# Create elasticsearch index -/var/alchemy/Phraseanet/bin/console searchengine:index -c - ## enable API and disable ssl on it -/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled true -/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl false +/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled $PHRASEANET_API_ENABLED +/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl $PHRASEANET_API_SSL # set instance title bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME /var/alchemy/Phraseanet/bin/console compile:configuration + +# Create elasticsearch index +/var/alchemy/Phraseanet/bin/console searchengine:index -c + +# Create _TRASH_ collection on first databox +/var/alchemy/Phraseanet/bin/console collection:create 1 _TRASH_ -d 1 + From 8619d7d88b161ff7ca7c5425a7307426d99b262e Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 00:17:49 +0200 Subject: [PATCH 02/24] install change db template to DublinCore model, edit DublinCore databox template --- .env | 2 +- lib/conf.d/data_templates/DublinCore.xml | 45 ++++++++++-------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/.env b/.env index 5996e11791..f5d7403856 100644 --- a/.env +++ b/.env @@ -41,7 +41,7 @@ INSTALL_DB_HOST=db INSTALL_DB_PORT=3306 INSTALL_DB_USER=root INSTALL_DB_PASSWORD=root -INSTALL_DB_TEMPLATE=en-simple +INSTALL_DB_TEMPLATE=DublinCore INSTALL_APPBOX=ab_master INSTALL_DATABOX=db_databox1 INSTALL_SERVER_NAME=localhost diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml index db3039df7f..e12b12f480 100644 --- a/lib/conf.d/data_templates/DublinCore.xml +++ b/lib/conf.d/data_templates/DublinCore.xml @@ -90,6 +90,21 @@ + + {{datapathnoweb}}{{basename}}/subdefs + 1 + 1280 + image + yes + screen + 72 + yes + yes + 75 + jpeg + + + {{datapathnoweb}}{{basename}}/subdefs 748 @@ -155,30 +170,6 @@ - - - {{datapathnoweb}}{{basename}}/subdefs - image - 240 - no - resample - 72 - screen - - - - - {{datapathnoweb}}{{basename}}/subdefs - image - 800 - no - resample - 72 - screen - - - - @@ -199,9 +190,9 @@ - - - + + + From 5c67882bdbdab32226a9a318393d743417221c00 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 01:17:17 +0200 Subject: [PATCH 03/24] PHRAS-3049 # comment define video poster in embed-bundle conf, add more field in DublinCore template --- lib/conf.d/configuration.yml | 4 ++-- lib/conf.d/data_templates/DublinCore.xml | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 8a7a62052d..b6fbb1e6a7 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -47,7 +47,7 @@ main: _doctype: limit: 10 _camera_model: - limit: 0 + limit: 10 _iso: limit: 0 _aperture: @@ -243,7 +243,7 @@ embed_bundle: video: player: videojs autoplay: false - cover_subdef: thumbnail + cover_subdef: videoposter message_start: StartOfMessage available_speeds: - 1 diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml index e12b12f480..0802d67af9 100644 --- a/lib/conf.d/data_templates/DublinCore.xml +++ b/lib/conf.d/data_templates/DublinCore.xml @@ -8,7 +8,7 @@ 1024 resample 72 - no + yes 75 yes screen @@ -90,7 +90,7 @@ - + {{datapathnoweb}}{{basename}}/subdefs 1 1280 @@ -193,6 +193,10 @@ + + + + From d24f3766525d4530edf8d587ac2802b6abc2b1bb Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 01:56:14 +0200 Subject: [PATCH 04/24] PHRAS-3049 #comment define volume during install #time 3h --- docker/phraseanet/auto-install.sh | 2 ++ lib/conf.d/configuration.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index c68c080036..f0e0f6135f 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -23,6 +23,8 @@ fi --appbox=$INSTALL_APPBOX \ --databox=$INSTALL_DATABOX \ --server-name=$INSTALL_SERVER_NAME \ + --download-path=/var/alchemy/Phraseanet/datas/download \ + --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index b6fbb1e6a7..93faaefdd8 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -243,7 +243,7 @@ embed_bundle: video: player: videojs autoplay: false - cover_subdef: videoposter + cover_subdef: poster message_start: StartOfMessage available_speeds: - 1 From 35cfd07f18424bc86e9bc85d4ff6e9b939995175 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 02:27:09 +0200 Subject: [PATCH 05/24] PHRAS-3049 #comment more volumes in auto-install --- docker/phraseanet/auto-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index f0e0f6135f..3ef97d520f 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,6 +25,9 @@ fi --server-name=$INSTALL_SERVER_NAME \ --download-path=/var/alchemy/Phraseanet/datas/download \ --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ + --caption-path=/var/alchemy/Phraseanet/tmp/caption + --scheduler-locks-path=/var/alchemy/Phraseanet/tmp/locks + --worker-tmp-files=/var/alchemy/Phraseanet/tmp/ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker From 870d81eaf69dcd694d9ce03c3c008f0fb1e72b78 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 02:43:48 +0200 Subject: [PATCH 06/24] PHRAS-3049 #comment roolback on --scheduler-locks-path --- docker/phraseanet/auto-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index 3ef97d520f..ec02d3e697 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,9 +25,8 @@ fi --server-name=$INSTALL_SERVER_NAME \ --download-path=/var/alchemy/Phraseanet/datas/download \ --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ - --caption-path=/var/alchemy/Phraseanet/tmp/caption - --scheduler-locks-path=/var/alchemy/Phraseanet/tmp/locks - --worker-tmp-files=/var/alchemy/Phraseanet/tmp/ + --caption-path=/var/alchemy/Phraseanet/tmp/caption \ + --worker-tmp-files=/var/alchemy/Phraseanet/tmp \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker From 9bbc36f6229a47ad522a0a057c8265cef7fb54e5 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Wed, 6 May 2020 00:58:25 +0200 Subject: [PATCH 07/24] Email config in entrypoint --- docker-compose.yml | 9 +++++++++ docker/phraseanet/entrypoint.sh | 13 ++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3eee64c36a..74490e9d35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,15 @@ services: - INSTALL_SERVER_NAME - INSTALL_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER - INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS + - PHRASEANET_EMITTER_EMAIL + - PHRASEANET_MAIL_OBJECT_PREFIX + - PHRASEANET_SMTP_ENABLED + - PHRASEANET_SMTP_HOST + - PHRASEANET_SMTP_PORT + - PHRASEANET_SMTP_AUTH_ENABLED + - PHRASEANET_SMTP_SECURE_MODE + - PHRASEANET_SMTP_USER + - PHRASEANET_SMTP_PASSWORD volumes: - config_vol:/var/alchemy/Phraseanet/config:rw - data_vol:/var/alchemy/Phraseanet/datas:rw diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index 621d8c2e5f..f98d0f9d24 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -18,8 +18,19 @@ chown -R app:app \ FILE=config/configuration.yml if [ -f "$FILE" ]; then - bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME echo "$FILE exists, skip setup." + bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME + if [[ $PHRASEANET_SMTP_ENABLED=true ]]; then + bin/setup system:config set registry.email.smtp-enabled $PHRASEANET_SMTP_ENABLED + bin/setup system:config set registry.email.smtp-auth-enabled $PHRASEANET_SMTP_AUTH_ENABLED + bin/setup system:config set registry.email.smtp-auth-secure-mode $PHRASEANET_SMTP_SECURE_MODE + bin/setup system:config set registry.email.smtp-auth-host $PHRASEANET_SMTP_HOST + bin/setup system:config set registry.email.smtp-auth-port $PHRASEANET_SMTP_PORT + bin/setup system:config set registry.email.smtp-user $PHRASEANET_SMTP_USER + bin/setup system:config set registry.email.smtp-password $PHRASEANET_SMTP_PASSWORD + 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 else echo "$FILE doesn't exist, entering setup..." runuser app -c docker/phraseanet/auto-install.sh From 65aa5a3aaaebcbec19e030b213edad936d5b5b21 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Thu, 30 Apr 2020 22:54:43 +0200 Subject: [PATCH 08/24] PHRAS-3049 #comment auto-install reorganisation, more environement variable for mail configuration and http api setting --- .env | 19 +++++++++++++++++- docker/phraseanet/auto-install.sh | 33 +++++++++++++++++++------------ 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.env b/.env index 1f3824846a..5996e11791 100644 --- a/.env +++ b/.env @@ -14,7 +14,7 @@ MYSQL_ROOT_PASSWORD=root SERVER_NAME=phraseanet-docker -# --------------- APPLICATION CONFIGURATION -------------------- +# --------------- PHP CONFIGURATION -------------------- # Max upload size MAX_BODY_SIZE=2G @@ -49,6 +49,23 @@ INSTALL_SERVER_NAME=localhost # Mysql max allowed packet MYSQL_MAX_ALLOWED_PACKET=16M +# --------------- APPLICATION CONFIGURATION -------------------- + +# api +PHRASEANET_API_ENABLED=true +PHRASEANET_API_SSL=true + +# Phraseanet mail configuration +PHRASEANET_EMITTER_EMAIL=phraseanet@example.com +PHRASEANET_MAIL_OBJECT_PREFIX= +PHRASEANET_SMTP_ENABLED=false +PHRASEANET_SMTP_HOST= +PHRASEANET_SMTP_PORT= +PHRASEANET_SMTP_AUTH_ENABLED=false +PHRASEANET_SMTP_SECURE_MODE=tls +PHRASEANET_SMTP_USER= +PHRASEANET_SMTP_PASSWORD= + # --- DEV purpose --- diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index c408f4aafa..c68c080036 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,6 +25,17 @@ fi --server-name=$INSTALL_SERVER_NAME \ --data-path=/var/alchemy/Phraseanet/datas -y + # Bus configuration for scheduler & worker +bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry +bin/setup system:config set workers.queue.worker-queue.host rabbitmq +bin/setup system:config set workers.queue.worker-queue.port 5672 +bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER +bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD +bin/setup system:config set workers.queue.worker-queue.vhost / + +/var/alchemy/Phraseanet/bin/console compile:configuration + + /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 @@ -38,22 +49,18 @@ fi /var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME /var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis -# Bus configuration for scheduler & worker -bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry -bin/setup system:config set workers.queue.worker-queue.host rabbitmq -bin/setup system:config set workers.queue.worker-queue.port 5672 -bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER -bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD -bin/setup system:config set workers.queue.worker-queue.vhost / - -# Create elasticsearch index -/var/alchemy/Phraseanet/bin/console searchengine:index -c - ## enable API and disable ssl on it -/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled true -/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl false +/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled $PHRASEANET_API_ENABLED +/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl $PHRASEANET_API_SSL # set instance title bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME /var/alchemy/Phraseanet/bin/console compile:configuration + +# Create elasticsearch index +/var/alchemy/Phraseanet/bin/console searchengine:index -c + +# Create _TRASH_ collection on first databox +/var/alchemy/Phraseanet/bin/console collection:create 1 _TRASH_ -d 1 + From b0ca1fd5ad7b2e387492bfe7dbd83c6f149ea00e Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 00:17:49 +0200 Subject: [PATCH 09/24] install change db template to DublinCore model, edit DublinCore databox template --- .env | 2 +- lib/conf.d/data_templates/DublinCore.xml | 45 ++++++++++-------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/.env b/.env index 5996e11791..f5d7403856 100644 --- a/.env +++ b/.env @@ -41,7 +41,7 @@ INSTALL_DB_HOST=db INSTALL_DB_PORT=3306 INSTALL_DB_USER=root INSTALL_DB_PASSWORD=root -INSTALL_DB_TEMPLATE=en-simple +INSTALL_DB_TEMPLATE=DublinCore INSTALL_APPBOX=ab_master INSTALL_DATABOX=db_databox1 INSTALL_SERVER_NAME=localhost diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml index db3039df7f..e12b12f480 100644 --- a/lib/conf.d/data_templates/DublinCore.xml +++ b/lib/conf.d/data_templates/DublinCore.xml @@ -90,6 +90,21 @@ + + {{datapathnoweb}}{{basename}}/subdefs + 1 + 1280 + image + yes + screen + 72 + yes + yes + 75 + jpeg + + + {{datapathnoweb}}{{basename}}/subdefs 748 @@ -155,30 +170,6 @@ - - - {{datapathnoweb}}{{basename}}/subdefs - image - 240 - no - resample - 72 - screen - - - - - {{datapathnoweb}}{{basename}}/subdefs - image - 800 - no - resample - 72 - screen - - - - @@ -199,9 +190,9 @@ - - - + + + From d0694457f397cf10b4b32bc29bbe618e707c6384 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 01:17:17 +0200 Subject: [PATCH 10/24] PHRAS-3049 # comment define video poster in embed-bundle conf, add more field in DublinCore template --- lib/conf.d/configuration.yml | 4 ++-- lib/conf.d/data_templates/DublinCore.xml | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 8a7a62052d..b6fbb1e6a7 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -47,7 +47,7 @@ main: _doctype: limit: 10 _camera_model: - limit: 0 + limit: 10 _iso: limit: 0 _aperture: @@ -243,7 +243,7 @@ embed_bundle: video: player: videojs autoplay: false - cover_subdef: thumbnail + cover_subdef: videoposter message_start: StartOfMessage available_speeds: - 1 diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml index e12b12f480..0802d67af9 100644 --- a/lib/conf.d/data_templates/DublinCore.xml +++ b/lib/conf.d/data_templates/DublinCore.xml @@ -8,7 +8,7 @@ 1024 resample 72 - no + yes 75 yes screen @@ -90,7 +90,7 @@ - + {{datapathnoweb}}{{basename}}/subdefs 1 1280 @@ -193,6 +193,10 @@ + + + + From 91207f9d98a6e9c3e4b40655b8d613fdc8cd5570 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 01:56:14 +0200 Subject: [PATCH 11/24] PHRAS-3049 #comment define volume during install #time 3h --- docker/phraseanet/auto-install.sh | 2 ++ lib/conf.d/configuration.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index c68c080036..f0e0f6135f 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -23,6 +23,8 @@ fi --appbox=$INSTALL_APPBOX \ --databox=$INSTALL_DATABOX \ --server-name=$INSTALL_SERVER_NAME \ + --download-path=/var/alchemy/Phraseanet/datas/download \ + --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index b6fbb1e6a7..93faaefdd8 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -243,7 +243,7 @@ embed_bundle: video: player: videojs autoplay: false - cover_subdef: videoposter + cover_subdef: poster message_start: StartOfMessage available_speeds: - 1 From 054a23734b903da9c4ea82bc843e410ceccfa029 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 02:27:09 +0200 Subject: [PATCH 12/24] PHRAS-3049 #comment more volumes in auto-install --- docker/phraseanet/auto-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index f0e0f6135f..3ef97d520f 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,6 +25,9 @@ fi --server-name=$INSTALL_SERVER_NAME \ --download-path=/var/alchemy/Phraseanet/datas/download \ --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ + --caption-path=/var/alchemy/Phraseanet/tmp/caption + --scheduler-locks-path=/var/alchemy/Phraseanet/tmp/locks + --worker-tmp-files=/var/alchemy/Phraseanet/tmp/ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker From ada01f28df63cd0ee9a29137ff447c1762e4c9b8 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 1 May 2020 02:43:48 +0200 Subject: [PATCH 13/24] PHRAS-3049 #comment roolback on --scheduler-locks-path --- docker/phraseanet/auto-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index 3ef97d520f..ec02d3e697 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -25,9 +25,8 @@ fi --server-name=$INSTALL_SERVER_NAME \ --download-path=/var/alchemy/Phraseanet/datas/download \ --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ - --caption-path=/var/alchemy/Phraseanet/tmp/caption - --scheduler-locks-path=/var/alchemy/Phraseanet/tmp/locks - --worker-tmp-files=/var/alchemy/Phraseanet/tmp/ + --caption-path=/var/alchemy/Phraseanet/tmp/caption \ + --worker-tmp-files=/var/alchemy/Phraseanet/tmp \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker From 6f07e9e8b070af3958504140ba5ebeb8bad6ecb9 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Wed, 6 May 2020 00:58:25 +0200 Subject: [PATCH 14/24] Email config in entrypoint --- docker-compose.yml | 9 +++++++++ docker/phraseanet/entrypoint.sh | 13 ++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3eee64c36a..74490e9d35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,15 @@ services: - INSTALL_SERVER_NAME - INSTALL_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER - INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS + - PHRASEANET_EMITTER_EMAIL + - PHRASEANET_MAIL_OBJECT_PREFIX + - PHRASEANET_SMTP_ENABLED + - PHRASEANET_SMTP_HOST + - PHRASEANET_SMTP_PORT + - PHRASEANET_SMTP_AUTH_ENABLED + - PHRASEANET_SMTP_SECURE_MODE + - PHRASEANET_SMTP_USER + - PHRASEANET_SMTP_PASSWORD volumes: - config_vol:/var/alchemy/Phraseanet/config:rw - data_vol:/var/alchemy/Phraseanet/datas:rw diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index 621d8c2e5f..f98d0f9d24 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -18,8 +18,19 @@ chown -R app:app \ FILE=config/configuration.yml if [ -f "$FILE" ]; then - bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME echo "$FILE exists, skip setup." + bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME + if [[ $PHRASEANET_SMTP_ENABLED=true ]]; then + bin/setup system:config set registry.email.smtp-enabled $PHRASEANET_SMTP_ENABLED + bin/setup system:config set registry.email.smtp-auth-enabled $PHRASEANET_SMTP_AUTH_ENABLED + bin/setup system:config set registry.email.smtp-auth-secure-mode $PHRASEANET_SMTP_SECURE_MODE + bin/setup system:config set registry.email.smtp-auth-host $PHRASEANET_SMTP_HOST + bin/setup system:config set registry.email.smtp-auth-port $PHRASEANET_SMTP_PORT + bin/setup system:config set registry.email.smtp-user $PHRASEANET_SMTP_USER + bin/setup system:config set registry.email.smtp-password $PHRASEANET_SMTP_PASSWORD + 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 else echo "$FILE doesn't exist, entering setup..." runuser app -c docker/phraseanet/auto-install.sh From 8aaf094716224f9c0f4960368556c42dcc1db023 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Mon, 11 May 2020 15:22:51 +0200 Subject: [PATCH 15/24] volumes for download,lazaret, tmp as env variable --- .env | 5 +++++ docker/phraseanet/auto-install.sh | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env b/.env index f5d7403856..a6491fa9d2 100644 --- a/.env +++ b/.env @@ -90,6 +90,11 @@ PHRASEANET_THUMBNAILS_DIR=./www/thumbnails PHRASEANET_CUSTOM_DIR=./www/custom PHRASEANET_TMP_DIR=./tmp PHRASEANET_CACHE_DIR=./cache +PHRASEANET_DOWNLOAD_DIR=./datas/download +PHRASEANET_LAZARET_DIR=./datas/lazaret +PHRASEANET_CAPTION_DIR=./tmp/caption +PHRASEANET_WORKER_TMP=./tmp/worker + # For dev who don't have SSH_AUTH_SOCK (avoid an empty volume name) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index ec02d3e697..c024af7357 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -23,10 +23,10 @@ fi --appbox=$INSTALL_APPBOX \ --databox=$INSTALL_DATABOX \ --server-name=$INSTALL_SERVER_NAME \ - --download-path=/var/alchemy/Phraseanet/datas/download \ - --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ - --caption-path=/var/alchemy/Phraseanet/tmp/caption \ - --worker-tmp-files=/var/alchemy/Phraseanet/tmp \ + --download-path=$PHRASEANET_DOWNLOAD_DIR \ + --lazaret-path=$PHRASEANET_LAZARET_DIR \ + --caption-path=$PHRASEANET_CAPTION_DIR \ + --worker-tmp-files=$PHRASEANET_WORKER_TMP \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker From fd8e9520a0665d62602e5735644b091d60928baf Mon Sep 17 00:00:00 2001 From: nmaillat Date: Mon, 11 May 2020 23:12:25 +0200 Subject: [PATCH 16/24] Renaming INSTALL env name --- .env | 14 +++++++------- docker/phraseanet/auto-install.sh | 18 +++++++----------- docker/phraseanet/entrypoint.sh | 1 + 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.env b/.env index a6491fa9d2..936666fc89 100644 --- a/.env +++ b/.env @@ -34,17 +34,17 @@ PHP_LOG_LEVEL=warning # These variables are only used if the configuration.yml file is not present, in order to automate the installation procedure # set here the first user / email couple -INSTALL_ACCOUNT_EMAIL=admin@alchemy.fr -INSTALL_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly +PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr +PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly # Database parameters -INSTALL_DB_HOST=db -INSTALL_DB_PORT=3306 -INSTALL_DB_USER=root -INSTALL_DB_PASSWORD=root +PHRASEANET_DB_HOST=db +PHRASEANET_DB_PORT=3306 +PHRASEANET_DB_USER=root +PHRASEANET_DB_PASSWORD=root INSTALL_DB_TEMPLATE=DublinCore INSTALL_APPBOX=ab_master INSTALL_DATABOX=db_databox1 -INSTALL_SERVER_NAME=localhost +PHRASEANET_SERVER_NAME=localhost # Mysql max allowed packet MYSQL_MAX_ALLOWED_PACKET=16M diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index 894bba3e84..b8b54348a0 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -13,24 +13,20 @@ if [ -z "$INSTALL_ACCOUNT_PASSWORD" ]; then fi /var/alchemy/Phraseanet/bin/setup system:install \ - --email=$INSTALL_ACCOUNT_EMAIL \ - --password=$INSTALL_ACCOUNT_PASSWORD \ - --db-host=$INSTALL_DB_HOST \ - --db-port=$INSTALL_DB_PORT \ - --db-user=$INSTALL_DB_USER \ - --db-password=$INSTALL_DB_PASSWORD \ + --email=$PHRASEANET_ADMIN_ACCOUNT_EMAIL \ + --password=$PHRASEANET_ADMIN_ACCOUNT_PASSWORD \ + --db-host=$PHRASEANET_DB_HOST \ + --db-port=$PHRASEANET_DB_PORT \ + --db-user=$PHRASEANET_DB_USER \ + --db-password=$PHRASEANET_DB_PASSWORD \ --db-template=$INSTALL_DB_TEMPLATE \ --appbox=$INSTALL_APPBOX \ --databox=$INSTALL_DATABOX \ - --server-name=$INSTALL_SERVER_NAME \ + --server-name=$PHRASEANET_SERVER_NAME \ --download-path=$PHRASEANET_DOWNLOAD_DIR \ --lazaret-path=$PHRASEANET_LAZARET_DIR \ --caption-path=$PHRASEANET_CAPTION_DIR \ --worker-tmp-files=$PHRASEANET_WORKER_TMP \ - --download-path=/var/alchemy/Phraseanet/datas/download \ - --lazaret-path=/var/alchemy/Phraseanet/datas/lazaret \ - --caption-path=/var/alchemy/Phraseanet/tmp/caption \ - --worker-tmp-files=/var/alchemy/Phraseanet/tmp \ --data-path=/var/alchemy/Phraseanet/datas -y # Bus configuration for scheduler & worker diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index f98d0f9d24..536b6ec7ad 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -31,6 +31,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 + bin/console user:password --user_id=1 --password=$PHRASEANET_ADMIN_ACCOUNT_PASSWORD else echo "$FILE doesn't exist, entering setup..." runuser app -c docker/phraseanet/auto-install.sh From 05486f6e354516de2cd4cdbe16af3d36df42d3c0 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Tue, 12 May 2020 00:09:46 +0200 Subject: [PATCH 17/24] Renaming INSTALL env name --- docker-compose.yml | 18 +++++++++--------- docker/phraseanet/auto-install.sh | 4 ++-- docker/phraseanet/entrypoint.sh | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 74490e9d35..c3516c6b9a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,18 +42,18 @@ services: - OPCACHE_ENABLED - SESSION_CACHE_LIMITER - PHP_LOG_LEVEL - - INSTALL_ACCOUNT_EMAIL - - INSTALL_ACCOUNT_PASSWORD - - INSTALL_DB_HOST - - INSTALL_DB_PORT - - INSTALL_DB_USER - - INSTALL_DB_PASSWORD + - PHRASEANET_ADMIN_ACCOUNT_EMAIL + - PHRASEANET_ADMIN_ACCOUNT_PASSWORD + - PHRASEANET_DB_HOST + - PHRASEANET_DB_PORT + - PHRASEANET_DB_USER + - PHRASEANET_DB_PASSWORD - INSTALL_DB_TEMPLATE - INSTALL_APPBOX - INSTALL_DATABOX - - INSTALL_SERVER_NAME - - INSTALL_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER - - INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS + - PHRASEANET_SERVER_NAME + - PHRASEANET_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER + - PHRASEANET_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS - PHRASEANET_EMITTER_EMAIL - PHRASEANET_MAIL_OBJECT_PREFIX - PHRASEANET_SMTP_ENABLED diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index b8b54348a0..de8dee4a9a 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -33,8 +33,8 @@ fi bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry bin/setup system:config set workers.queue.worker-queue.host rabbitmq bin/setup system:config set workers.queue.worker-queue.port 5672 -bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER -bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD +bin/setup system:config set workers.queue.worker-queue.user $PHRASEANET_RABBITMQ_USER +bin/setup system:config set workers.queue.worker-queue.password $PHRASEANET_RABBITMQ_PASSWORD bin/setup system:config set workers.queue.worker-queue.vhost / /var/alchemy/Phraseanet/bin/console compile:configuration diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index 536b6ec7ad..9d22cef4ff 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -31,7 +31,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 - bin/console user:password --user_id=1 --password=$PHRASEANET_ADMIN_ACCOUNT_PASSWORD + bin/console user:password --user_id=1 --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y else echo "$FILE doesn't exist, entering setup..." runuser app -c docker/phraseanet/auto-install.sh From 5e10b6cc046c64e7647cb4cf2655f9241726e742 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Tue, 12 May 2020 00:28:42 +0200 Subject: [PATCH 18/24] Fix install admin account test env name --- docker/phraseanet/auto-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index de8dee4a9a..2fb61094b5 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -2,13 +2,13 @@ set -xe -if [ -z "$INSTALL_ACCOUNT_EMAIL" ]; then - echo "INSTALL_ACCOUNT_EMAIL var is not set." +if [ -z "$PHRASEANET_ADMIN_ACCOUNT_EMAIL" ]; then + echo "PHRASEANET_ADMIN_ACCOUNT_EMAIL, Phraseanet admin account var is not set." exit 1 fi -if [ -z "$INSTALL_ACCOUNT_PASSWORD" ]; then - echo "INSTALL_ACCOUNT_PASSWORD var is not set." +if [ -z "$PHRASEANET_ADMIN_ACCOUNT_PASSWORD " ]; then + echo "$PHRASEANET_ADMIN_ACCOUNT_PASSWORD, Phaseanet admin password var is not set." exit 1 fi From 1ae39daa860e2236202027defa178de897a38d62 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Wed, 13 May 2020 21:34:50 +0200 Subject: [PATCH 19/24] PHRAS-3049 #comment Move Mailhog, builder from overide to docker compose, mount cache in builder --- .env | 8 ++--- docker-compose.override.yml | 30 ---------------- docker-compose.yml | 70 +++++++++++++++++++++++++++---------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.env b/.env index 936666fc89..60ac9edbea 100644 --- a/.env +++ b/.env @@ -29,9 +29,9 @@ SESSION_CACHE_LIMITER=off # PHP LOG LEVEL : Possible Values: alert, error, warning, notice, debug PHP_LOG_LEVEL=warning -# --------------- APPLICATION STARTUP CONFIGURATION -------------------- +# --------------- PHRASEANET CONFIGURATION -------------------- -# These variables are only used if the configuration.yml file is not present, in order to automate the installation procedure +# These variables are used in the configuration.yml . # set here the first user / email couple PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr @@ -49,8 +49,6 @@ PHRASEANET_SERVER_NAME=localhost # Mysql max allowed packet MYSQL_MAX_ALLOWED_PACKET=16M -# --------------- APPLICATION CONFIGURATION -------------------- - # api PHRASEANET_API_ENABLED=true PHRASEANET_API_SSL=true @@ -80,7 +78,7 @@ PHRASEANET_SUBNET_IPS=172.32.0.0/16 XDEBUG_REMOTE_HOST=172.32.0.1 PHP_IDE_CONFIG=serverName=docker-server-phraseanet -# Volumes location for dev +# Volumes location PHRASEANET_CONFIG_DIR=./config PHRASEANET_LOGS_DIR=./logs PHRASEANET_DATA_DIR=./datas diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ef5b56c55f..9bd7f3dc9e 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -18,28 +18,6 @@ services: - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - builder: - build: - context: . - target: builder - args: - - SSH_PRIVATE_KEY=${PHRASEANET_SSH_PRIVATE_KEY} - - PHRASEANET_PLUGINS=${PHRASEANET_PLUGINS} - stdin_open: true - tty: true - volumes: - - ../:/var/alchemy - - .:/var/alchemy/Phraseanet - - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw - - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw - - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - - ${SSH_AUTH_SOCK}:/ssh-auth-sock - - ${HOME}/.ssh:/home/app/.ssh - - dev_vol:/home/app - environment: - - PHRASEANET_PROJECT_NAME phraseanet: environment: @@ -75,11 +53,6 @@ services: volumes: - ${PHRASEANET_DB_DIR}:/var/lib/mysql:rw - mailhog: - image: mailhog/mailhog - ports: - - 1025:1025 - - 8025:8025 elasticsearch: ports: @@ -122,6 +95,3 @@ networks: config: - subnet: $PHRASEANET_SUBNET_IPS -volumes: - dev_vol: - driver: local diff --git a/docker-compose.yml b/docker-compose.yml index c3516c6b9a..758d62e95b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,9 +11,9 @@ services: image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-nginx:$PHRASEANET_DOCKER_TAG restart: on-failure volumes: - - data_vol:/var/alchemy/Phraseanet/datas:rw - - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw - - custom_vol:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw + - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw + - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw depends_on: - phraseanet environment: @@ -64,13 +64,13 @@ services: - PHRASEANET_SMTP_USER - PHRASEANET_SMTP_PASSWORD volumes: - - config_vol:/var/alchemy/Phraseanet/config:rw - - data_vol:/var/alchemy/Phraseanet/datas:rw - - tmp_vol:/var/alchemy/Phraseanet/tmp:rw - - logs_vol:/var/alchemy/Phraseanet/logs:rw - - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw - - custom_vol:/var/alchemy/Phraseanet/www/custom:rw - - cache_vol:/var/alchemy/Phraseanet/cache:rw + - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw + - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw + - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw + - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw + - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw + - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw worker: build: @@ -94,13 +94,13 @@ services: - SESSION_CACHE_LIMITER - PHP_LOG_LEVEL volumes: - - config_vol:/var/alchemy/Phraseanet/config:rw - - data_vol:/var/alchemy/Phraseanet/datas:rw - - tmp_vol:/var/alchemy/Phraseanet/tmp:rw - - logs_vol:/var/alchemy/Phraseanet/logs:rw - - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw - - custom_vol:/var/alchemy/Phraseanet/www/custom:rw - - cache_vol:/var/alchemy/Phraseanet/cache:rw + - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw + - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw + - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw + - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw + - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw + - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw db: image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-db:$PHRASEANET_DOCKER_TAG @@ -110,7 +110,7 @@ services: - MYSQL_ROOT_PASSWORD - MYSQL_MAX_ALLOWED_PACKET volumes: - - db_vol:/var/lib/mysql + - ${PHRASEANET_DB_DIR}:/var/lib/mysql rabbitmq: image: rabbitmq:3-management @@ -128,7 +128,37 @@ services: build: ./docker/elasticsearch restart: on-failure volumes: - - elasticsearch_vol:/usr/share/elasticsearch/data + - ${PHRASEANET_ELASTICSEARCH_DIR}:/usr/share/elasticsearch/data + + builder: + build: + context: . + target: builder + args: + - SSH_PRIVATE_KEY=${PHRASEANET_SSH_PRIVATE_KEY} + - PHRASEANET_PLUGINS=${PHRASEANET_PLUGINS} + stdin_open: true + tty: true + volumes: + - ../:/var/alchemy + - .:/var/alchemy/Phraseanet + - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw + - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw + - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw + - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw + - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw + - ${SSH_AUTH_SOCK}:/ssh-auth-sock + - ${HOME}/.ssh:/home/app/.ssh + - dev_vol:/home/app + environment: + - PHRASEANET_PROJECT_NAME + + mailhog: + image: mailhog/mailhog + ports: + - 1025:1025 + - 8025:8025 volumes: config_vol: @@ -150,3 +180,5 @@ volumes: # to be replacer by stdout/stderr logs_vol: driver: local + dev_vol: + driver: local \ No newline at end of file From 50f016ebb52c6c615a20a30d71acbc5e3d02326a Mon Sep 17 00:00:00 2001 From: aynsix Date: Wed, 27 May 2020 19:55:45 +0300 Subject: [PATCH 20/24] fix mysql server gone away and dead lock on table --- .../WorkerRunningJobRepository.php | 8 ++++ .../Subscriber/RecordSubscriber.php | 38 ++++++++++++------- .../Worker/SubdefCreationWorker.php | 20 ++++++++-- .../Worker/WriteMetadatasWorker.php | 2 + 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php index a3b584058d..8d8655ec6a 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php @@ -102,4 +102,12 @@ class WorkerRunningJobRepository extends EntityRepository { return parent::getEntityManager(); } + + public function reconnect() + { + if($this->_em->getConnection()->ping() === false) { + $this->_em->getConnection()->close(); + $this->_em->getConnection()->connect(); + } + } } diff --git a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php index d225a0c37a..c0df49717d 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php @@ -101,6 +101,9 @@ class RecordSubscriber implements EventSubscriberInterface $repoWorker = $this->getRepoWorker(); $em = $repoWorker->getEntityManager(); + // check connection an re-connect if needed + $repoWorker->reconnect(); + $workerRunningJob = $repoWorker->findOneBy([ 'databoxId' => $event->getRecord()->getDataboxId(), 'recordId' => $event->getRecord()->getRecordId(), @@ -108,13 +111,15 @@ class RecordSubscriber implements EventSubscriberInterface 'workOn' => $event->getSubdefName() ]); - $em->beginTransaction(); - try { - $em->remove($workerRunningJob); - $em->flush(); - $em->commit(); - } catch (\Exception $e) { - $em->rollback(); + if ($workerRunningJob) { + $em->beginTransaction(); + try { + $em->remove($workerRunningJob); + $em->flush(); + $em->commit(); + } catch (\Exception $e) { + $em->rollback(); + } } $this->messagePublisher->publishMessage( @@ -223,6 +228,9 @@ class RecordSubscriber implements EventSubscriberInterface $repoWorker = $this->getRepoWorker(); $em = $repoWorker->getEntityManager(); + // check connection an re-connect if needed + $repoWorker->reconnect(); + $workerRunningJob = $repoWorker->findOneBy([ 'databoxId' => $event->getRecord()->getDataboxId(), 'recordId' => $event->getRecord()->getRecordId(), @@ -230,13 +238,15 @@ class RecordSubscriber implements EventSubscriberInterface 'workOn' => $event->getSubdefName() ]); - $em->beginTransaction(); - try { - $em->remove($workerRunningJob); - $em->flush(); - $em->commit(); - } catch (\Exception $e) { - $em->rollback(); + if ($workerRunningJob) { + $em->beginTransaction(); + try { + $em->remove($workerRunningJob); + $em->flush(); + $em->commit(); + } catch (\Exception $e) { + $em->rollback(); + } } $this->messagePublisher->publishMessage( diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php index a05d8a1aa7..68b08ed020 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php @@ -81,6 +81,7 @@ class SubdefCreationWorker implements WorkerInterface // tell that a file is in used to create subdef $em = $this->repoWorker->getEntityManager(); + $this->repoWorker->reconnect(); $em->beginTransaction(); try { @@ -108,13 +109,13 @@ class SubdefCreationWorker implements WorkerInterface try { $this->subdefGenerator->generateSubdefs($record, $wantedSubdef); } catch (\Exception $e) { - $em->beginTransaction(); try { + $this->repoWorker->reconnect(); + $em->getConnection()->beginTransaction(); $em->remove($workerRunningJob); $em->flush(); $em->commit(); } catch (\Exception $e) { - $em->rollback(); } } @@ -170,7 +171,8 @@ class SubdefCreationWorker implements WorkerInterface $this->indexer->flushQueue(); // tell that we have finished to work on this file - $em->beginTransaction(); + $this->repoWorker->reconnect(); + $em->getConnection()->beginTransaction(); try { $workerRunningJob->setStatus(WorkerRunningJob::FINISHED); $workerRunningJob->setFinished(new \DateTime('now')); @@ -178,7 +180,17 @@ class SubdefCreationWorker implements WorkerInterface $em->flush(); $em->commit(); } catch (\Exception $e) { - $em->rollback(); + try { + $em->getConnection()->beginTransaction(); + $workerRunningJob->setStatus(WorkerRunningJob::FINISHED); + $em->persist($workerRunningJob); + $em->flush(); + $em->commit(); + } catch (\Exception $e) { + $this->messagePublisher->pushLog("rollback on recordID :" . $workerRunningJob->getRecordId()); + $em->rollback(); + } + } } } diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php index 6c02078ac1..aea5376a73 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php @@ -82,6 +82,7 @@ class WriteMetadatasWorker implements WorkerInterface // tell that a file is in used to create subdef $em = $this->getEntityManager(); + $this->repoWorker->reconnect(); $em->beginTransaction(); try { @@ -245,6 +246,7 @@ class WriteMetadatasWorker implements WorkerInterface // tell that we have finished to work on this file + $this->repoWorker->reconnect(); $em->beginTransaction(); try { $workerRunningJob->setStatus(WorkerRunningJob::FINISHED); From 24261483d74a61972ef57ab98aa264beabef2348 Mon Sep 17 00:00:00 2001 From: aynsix Date: Thu, 28 May 2020 20:29:15 +0300 Subject: [PATCH 21/24] catch exception on the worker --- .../Worker/SubdefCreationWorker.php | 14 ++++++++++++++ .../Worker/WriteMetadatasWorker.php | 19 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php index 68b08ed020..1bf324943f 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php @@ -117,6 +117,20 @@ class SubdefCreationWorker implements WorkerInterface $em->commit(); } catch (\Exception $e) { } + } catch (\Throwable $e) { + $count = isset($payload['count']) ? $payload['count'] + 1 : 2 ; + $workerMessage = "Exception throwable catched when create subdef for the recordID: " .$recordId; + + $this->logger->error($workerMessage); + + $this->dispatcher->dispatch(WorkerEvents::SUBDEFINITION_CREATION_FAILURE, new SubdefinitionCreationFailureEvent( + $record, + $payload['subdefName'], + $workerMessage, + $count + )); + + return ; } // begin to check if the subdef is successfully generated diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php index aea5376a73..8ec819cb77 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php @@ -107,7 +107,24 @@ class WriteMetadatasWorker implements WorkerInterface $record = $databox->get_record($recordId); - $subdef = $record->get_subdef($payload['subdefName']); + try { + $subdef = $record->get_subdef($payload['subdefName']); + } catch (\Exception $e) { + $workerMessage = "Exception catched when try to get subdef " .$payload['subdefName']. " from DB for the recordID: " .$recordId; + $this->logger->error($workerMessage); + + $count = isset($payload['count']) ? $payload['count'] + 1 : 2 ; + + $this->dispatch(WorkerEvents::SUBDEFINITION_WRITE_META, new SubdefinitionWritemetaEvent( + $record, + $payload['subdefName'], + SubdefinitionWritemetaEvent::FAILED, + $workerMessage, + $count + )); + + return ; + } if ($subdef->is_physically_present()) { $metadata = new MetadataBag(); From bdd0032ed57ecffbb1b2f2244c0f79a6c8f7606f Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 29 May 2020 01:35:30 +0200 Subject: [PATCH 22/24] PHRAS-3009 #comment add audio preview in dublincore model --- docker-compose.override.yml | 30 ++++++++++++-- docker-compose.yml | 52 +++++++----------------- lib/conf.d/configuration.yml | 2 +- lib/conf.d/data_templates/DublinCore.xml | 26 +++++++++++- 4 files changed, 65 insertions(+), 45 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 9bd7f3dc9e..8433fb7a4e 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -18,6 +18,29 @@ services: - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + builder: + build: + context: . + target: builder + args: + - SSH_PRIVATE_KEY=${PHRASEANET_SSH_PRIVATE_KEY} + - PHRASEANET_PLUGINS=${PHRASEANET_PLUGINS} + stdin_open: true + tty: true + volumes: + - ../:/var/alchemy + - .:/var/alchemy/Phraseanet + - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw + - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw + - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw + - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw + - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw + - ${SSH_AUTH_SOCK}:/ssh-auth-sock + - ${HOME}/.ssh:/home/app/.ssh + - dev_vol:/home/app + environment: + - PHRASEANET_PROJECT_NAME phraseanet: environment: @@ -32,7 +55,8 @@ services: - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw + - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw worker: volumes: @@ -44,7 +68,7 @@ services: - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw - + rabbitmq: ports: - ${RABBITMQ_MANAGEMENT_PORT}:15672 @@ -53,7 +77,6 @@ services: volumes: - ${PHRASEANET_DB_DIR}:/var/lib/mysql:rw - elasticsearch: ports: - 9200:9200 @@ -94,4 +117,3 @@ networks: ipam: config: - subnet: $PHRASEANET_SUBNET_IPS - diff --git a/docker-compose.yml b/docker-compose.yml index 758d62e95b..d8d716cb4e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,13 +64,13 @@ services: - PHRASEANET_SMTP_USER - PHRASEANET_SMTP_PASSWORD volumes: - - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw - - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw - - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw - - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw + - config_vol:/var/alchemy/Phraseanet/config:rw + - data_vol:/var/alchemy/Phraseanet/datas:rw + - tmp_vol:/var/alchemy/Phraseanet/tmp:rw + - logs_vol:/var/alchemy/Phraseanet/logs:rw + - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw + - custom_vol:/var/alchemy/Phraseanet/www/custom:rw + - cache_vol:/var/alchemy/Phraseanet/cache:rw worker: build: @@ -94,13 +94,13 @@ services: - SESSION_CACHE_LIMITER - PHP_LOG_LEVEL volumes: - - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw - - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw - - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw - - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw + - config_vol:/var/alchemy/Phraseanet/config:rw + - data_vol:/var/alchemy/Phraseanet/datas:rw + - tmp_vol:/var/alchemy/Phraseanet/tmp:rw + - logs_vol:/var/alchemy/Phraseanet/logs:rw + - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw + - custom_vol:/var/alchemy/Phraseanet/www/custom:rw + - cache_vol:/var/alchemy/Phraseanet/cache:rw db: image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-db:$PHRASEANET_DOCKER_TAG @@ -130,30 +130,6 @@ services: volumes: - ${PHRASEANET_ELASTICSEARCH_DIR}:/usr/share/elasticsearch/data - builder: - build: - context: . - target: builder - args: - - SSH_PRIVATE_KEY=${PHRASEANET_SSH_PRIVATE_KEY} - - PHRASEANET_PLUGINS=${PHRASEANET_PLUGINS} - stdin_open: true - tty: true - volumes: - - ../:/var/alchemy - - .:/var/alchemy/Phraseanet - - ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw - - ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw - - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw - - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw - - ${SSH_AUTH_SOCK}:/ssh-auth-sock - - ${HOME}/.ssh:/home/app/.ssh - - dev_vol:/home/app - environment: - - PHRASEANET_PROJECT_NAME - mailhog: image: mailhog/mailhog ports: diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index c28999a566..4013f8a44e 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -159,7 +159,7 @@ border-manager: type: Checker\MediaType enabled: false options: - mediatypes: [Audio, Document, Flash, Image, Video] + mediatypes: [Audio, Document, Image, Video] user_account: deleting_policies: email_confirmation: true diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml index 0802d67af9..ffd40733f8 100644 --- a/lib/conf.d/data_templates/DublinCore.xml +++ b/lib/conf.d/data_templates/DublinCore.xml @@ -117,8 +117,30 @@ 25 25 libvpx - - + + + {{datapathnoweb}}{{basename}}/subview + no + audio + 128 + 8000 + pcm_s16le + mono + all + + + + + {{datapathnoweb}}{{basename}}/subview + no + audio + 180 + 44100 + libmp3lame + + all + + From 1b3fedee605b88c086cbab0066478077c55c8cc9 Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 29 May 2020 01:46:59 +0200 Subject: [PATCH 23/24] create private and public collection --- docker/phraseanet/auto-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index 2fb61094b5..2742102be1 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -37,9 +37,6 @@ bin/setup system:config set workers.queue.worker-queue.user $PHRASEANET_RABBITMQ bin/setup system:config set workers.queue.worker-queue.password $PHRASEANET_RABBITMQ_PASSWORD bin/setup system:config set workers.queue.worker-queue.vhost / -/var/alchemy/Phraseanet/bin/console compile:configuration - - /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 @@ -66,5 +63,6 @@ bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME /var/alchemy/Phraseanet/bin/console searchengine:index -c # Create _TRASH_ collection on first databox +/var/alchemy/Phraseanet/bin/console collection:create 1 Public -d 1 +/var/alchemy/Phraseanet/bin/console collection:create 1 Private -d 1 /var/alchemy/Phraseanet/bin/console collection:create 1 _TRASH_ -d 1 - From dddc95010346bba866ec78ced3e96d94debef50c Mon Sep 17 00:00:00 2001 From: nmaillat Date: Fri, 29 May 2020 10:58:17 +0200 Subject: [PATCH 24/24] add cache volumes to worker --- docker-compose.override.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 8433fb7a4e..838e32e64c 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -67,6 +67,7 @@ services: - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw + - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw rabbitmq: