From: Jérôme Benoit Date: Sun, 3 Mar 2024 23:15:44 +0000 (+0100) Subject: fix: ensure docker image configurations can be overriden from X-Git-Tag: v1.3.0~57 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=830edb9829646c62d87eed61683df948ca6cf122;p=e-mobility-charging-stations-simulator.git fix: ensure docker image configurations can be overriden from assets/configs-docker Signed-off-by: Jérôme Benoit --- 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