From 830edb9829646c62d87eed61683df948ca6cf122 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 4 Mar 2024 00:15:44 +0100 Subject: [PATCH] fix: ensure docker image configurations can be overriden from assets/configs-docker MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .gitignore | 1 + bundle.js | 7 ++++++- docker/autoconfig.sh | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2315d182..c8f0f089 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bundle.js b/bundle.js index 912d16d9..806f66c5 100644 --- 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'] } ] }) diff --git a/docker/autoconfig.sh b/docker/autoconfig.sh index 11815905..24973efc 100755 --- a/docker/autoconfig.sh +++ b/docker/autoconfig.sh @@ -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 -- 2.34.1