fix: ensure docker image configurations can be overriden from
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 3 Mar 2024 23:15:44 +0000 (00:15 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 3 Mar 2024 23:15:44 +0000 (00:15 +0100)
assets/configs-docker

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.gitignore
bundle.js
docker/autoconfig.sh

index 2315d1829532b2aadd5027dff3b07597cd352569..c8f0f08948512c47aa7c4fcdfea8d092bac451da 100644 (file)
@@ -4,6 +4,7 @@ src/assets/config*.json
 src/scripts/scriptConfig.json
 src/assets/*idtags*.json
 !src/assets/idtags-template.json
+src/assets/configs-docker/*.json
 mikro-orm.config*.ts
 !mikro-orm.config-template.ts
 manifest*.yml
index 912d16d95ae41f32ae40a562206c4950bb43d697..806f66c5a93b1f00fd07dffd1782da9b2d0d98c7 100644 (file)
--- a/bundle.js
+++ b/bundle.js
@@ -47,7 +47,8 @@ await build({
         './dist/assets/*.json',
         './dist/assets/json-schemas',
         './dist/assets/station-templates',
-        './dist/assets/ui-protocol'
+        './dist/assets/ui-protocol',
+        './dist/assets/configs-docker'
       ]
     }),
     copy({
@@ -67,6 +68,10 @@ await build({
         {
           from: ['./src/assets/station-templates/**/*.json'],
           to: ['./assets/station-templates']
+        },
+        {
+          from: ['./src/assets/configs-docker/*.json'],
+          to: ['./assets/configs-docker']
         }
       ]
     })
index 118159054402d2ed59987b162694723873ec0fae..24973efcee5b31cfec90f402cd5e9dc3a2089756 100755 (executable)
@@ -7,8 +7,9 @@ then
   [ -z $emobility_server_type ] && { echo "emobility env server type variable not found, exiting"; exit 1; }
   [ -z $emobility_service_type ] && { echo "emobility env service type variable not found, exiting"; exit 1; }
 
-  cp $emobility_install_dir/dist/assets/configs-aws/$emobility_server_type-$emobility_service_type-$emobility_landscape.json $emobility_install_dir/dist/assets/config.json
-  cp $emobility_install_dir/dist/assets/configs-aws/$emobility_server_type-$emobility_service_type-$emobility_landscape-idtags.json $emobility_install_dir/dist/assets/idtags.json
+  cp $emobility_install_dir/dist/assets/configs-docker/$emobility_server_type-$emobility_service_type-$emobility_landscape.json $emobility_install_dir/dist/assets/config.json
+  cp $emobility_install_dir/dist/assets/configs-docker/$emobility_server_type-$emobility_service_type-$emobility_landscape-idtags.json $emobility_install_dir/dist/assets/idtags.json
+  cp $emobility_install_dir/dist/assets/configs-docker/$emobility_server_type-$emobility_service_type-$emobility_landscape-webui.json $emobility_install_dir/ui/web/public/config.json
 else
   echo "no emobility env defined, start with default configuration"
 fi