From 2f701c4b7e0867bc907970341e8ec555682d5d3e Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 18 Sep 2024 17:14:38 -0400 Subject: [PATCH 1/2] not working but hey --- smui/Dockerfile | 8 ++++ smui/conf/custom-application.conf | 74 +++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 smui/conf/custom-application.conf diff --git a/smui/Dockerfile b/smui/Dockerfile index 2eb14d3..d7b7327 100644 --- a/smui/Dockerfile +++ b/smui/Dockerfile @@ -12,3 +12,11 @@ RUN apt-get update -y && apt-get install -y python3 python3-pip USER smui RUN python3 -m pip install requests + +# Need custom CMD to include our custom-application.conf +CMD java \ + -Dpidfile.path=$SMUI_CONF_PID_PATH \ + -Dlogback.configurationFile=$SMUI_CONF_LOGBACK_XML_PATH \ + -Dhttp.port=$SMUI_CONF_HTTP_PORT \ + -Dconfig.file="/smui/conf/custom-application.conf" \ + -jar /smui/search-management-ui-assembly-$SMUI_VERSION.jar diff --git a/smui/conf/custom-application.conf b/smui/conf/custom-application.conf new file mode 100644 index 0000000..eb7d502 --- /dev/null +++ b/smui/conf/custom-application.conf @@ -0,0 +1,74 @@ +include "application.conf" + +smui.target-environment.config="""{ + "LIVE": { + "ecommerce": [ + { + "rulesCollection": "Chorus Webshop", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/en/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "Chorus Webshop", + "tenantTag": "tenant:HA", + "previewUrlTemplate": "https://www.example.com/en/alternative-tenant/search?query=$QUERY" + } + ], + "de": [ + { + "rulesCollection": "MainTenantDE", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/de/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "AlternativeTenantDE", + "tenantTag": "tenant:ALTERNATIVE", + "previewUrlTemplate": "https://www.example.com/de/alternative-tenant/search?query=$QUERY" + } + ], + "fr": [ + { + "rulesCollection": "MainTenantFR", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/fr/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "AlternativeTenantFR", + "tenantTag": "tenant:ALTERNATIVE", + "previewUrlTemplate": "https://www.example.com/fr/alternative-tenant/search?query=$QUERY" + } + ] + }, + "PRELIVE": { + "ecommerce": [ + { + "rulesCollection": "Chorus Webshop", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/en/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "Chorus Webshop", + "tenantTag": "tenant:HA", + "previewUrlTemplate": "https://www.example.com/en/alternative-tenant/search?query=$QUERY" + } + ], + "de": [ + { + "rulesCollection": "MainTenantDE", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/de/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "AlternativeTenantDE", + "tenantTag": "tenant:ALTERNATIVE", + "previewUrlTemplate": "https://www.example.com/de/alternative-tenant/search?query=$QUERY" + } + ], + "fr": [ + { + "rulesCollection": "MainTenantFR", + "tenantTag": null, + "previewUrlTemplate": "https://www.example.com/fr/main-tenant/search?query=$QUERY" + }, { + "rulesCollection": "AlternativeTenantFR", + "tenantTag": "tenant:ALTERNATIVE", + "previewUrlTemplate": "https://www.example.com/fr/alternative-tenant/search?query=$QUERY" + } + ] + } +}""" From 0602b961ef7dc55953b5a3b6e52d598b9174edd7 Mon Sep 17 00:00:00 2001 From: Matthias Krueger Date: Thu, 19 Sep 2024 15:23:37 +0200 Subject: [PATCH 2/2] Update custom-application.conf --- smui/conf/custom-application.conf | 60 +++---------------------------- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/smui/conf/custom-application.conf b/smui/conf/custom-application.conf index eb7d502..b1a62a8 100644 --- a/smui/conf/custom-application.conf +++ b/smui/conf/custom-application.conf @@ -2,72 +2,20 @@ include "application.conf" smui.target-environment.config="""{ "LIVE": { - "ecommerce": [ + "fancy_preview": [ { - "rulesCollection": "Chorus Webshop", + "rulesCollection": "6e1d4f5f-3436-4a85-b4d2-0c02ae6301f2", "tenantTag": null, "previewUrlTemplate": "https://www.example.com/en/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "Chorus Webshop", - "tenantTag": "tenant:HA", - "previewUrlTemplate": "https://www.example.com/en/alternative-tenant/search?query=$QUERY" - } - ], - "de": [ - { - "rulesCollection": "MainTenantDE", - "tenantTag": null, - "previewUrlTemplate": "https://www.example.com/de/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "AlternativeTenantDE", - "tenantTag": "tenant:ALTERNATIVE", - "previewUrlTemplate": "https://www.example.com/de/alternative-tenant/search?query=$QUERY" - } - ], - "fr": [ - { - "rulesCollection": "MainTenantFR", - "tenantTag": null, - "previewUrlTemplate": "https://www.example.com/fr/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "AlternativeTenantFR", - "tenantTag": "tenant:ALTERNATIVE", - "previewUrlTemplate": "https://www.example.com/fr/alternative-tenant/search?query=$QUERY" } ] }, "PRELIVE": { - "ecommerce": [ + "fancy_preview": [ { - "rulesCollection": "Chorus Webshop", + "rulesCollection": "6e1d4f5f-3436-4a85-b4d2-0c02ae6301f2", "tenantTag": null, "previewUrlTemplate": "https://www.example.com/en/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "Chorus Webshop", - "tenantTag": "tenant:HA", - "previewUrlTemplate": "https://www.example.com/en/alternative-tenant/search?query=$QUERY" - } - ], - "de": [ - { - "rulesCollection": "MainTenantDE", - "tenantTag": null, - "previewUrlTemplate": "https://www.example.com/de/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "AlternativeTenantDE", - "tenantTag": "tenant:ALTERNATIVE", - "previewUrlTemplate": "https://www.example.com/de/alternative-tenant/search?query=$QUERY" - } - ], - "fr": [ - { - "rulesCollection": "MainTenantFR", - "tenantTag": null, - "previewUrlTemplate": "https://www.example.com/fr/main-tenant/search?query=$QUERY" - }, { - "rulesCollection": "AlternativeTenantFR", - "tenantTag": "tenant:ALTERNATIVE", - "previewUrlTemplate": "https://www.example.com/fr/alternative-tenant/search?query=$QUERY" } ] }