From 8cdc56a9563aacbe190637258013ce104053b4c8 Mon Sep 17 00:00:00 2001 From: romer8 Date: Mon, 20 May 2024 21:48:45 -0600 Subject: [PATCH 1/3] added own version of geoserver for multi architectures --- viewOnTethys.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/viewOnTethys.sh b/viewOnTethys.sh index 58f002a..e7c918f 100755 --- a/viewOnTethys.sh +++ b/viewOnTethys.sh @@ -15,7 +15,9 @@ RESET='\e[0m' # run the geoserver docker container _run_geoserver(){ - _execute_command_geoserver docker run -it --rm -d -p $GEOSERVER_PORT_HOST:$GEOSERVER_PORT_CONTAINER \ + _execute_command_geoserver docker run -it --rm -d \ + --platform $PLATFORM \ + -p $GEOSERVER_PORT_HOST:$GEOSERVER_PORT_CONTAINER \ --env CORS_ENABLED=true \ --env SKIP_DEMO_DATA=true \ --network $DOCKER_NETWORK \ @@ -545,7 +547,7 @@ GEOSERVER_PORT_HOST="8181" DOCKER_NETWORK="tethys-network" APP_WORKSPACE_PATH="/usr/lib/tethys/apps/ngiab/tethysapp/ngiab/workspaces/app_workspace" TETHYS_IMAGE_NAME=awiciroh/tethys-ngiab:main -GEOSERVER_IMAGE_NAME=docker.osgeo.org/geoserver:2.25.x +GEOSERVER_IMAGE_NAME=gioelkin/geoserver:2.25.x DATA_FOLDER_PATH="$1" TETHYS_PERSIST_PATH="/var/lib/tethys_persist" CONFIG_FILE="$HOME/.host_data_path.conf" From af3202cebee6e403ec422117341da487fffec56b Mon Sep 17 00:00:00 2001 From: romer8 Date: Tue, 21 May 2024 22:00:22 -0600 Subject: [PATCH 2/3] changing healthcheck and image --- viewOnTethys.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/viewOnTethys.sh b/viewOnTethys.sh index e7c918f..84839b4 100755 --- a/viewOnTethys.sh +++ b/viewOnTethys.sh @@ -546,7 +546,7 @@ GEOSERVER_PORT_CONTAINER="8080" GEOSERVER_PORT_HOST="8181" DOCKER_NETWORK="tethys-network" APP_WORKSPACE_PATH="/usr/lib/tethys/apps/ngiab/tethysapp/ngiab/workspaces/app_workspace" -TETHYS_IMAGE_NAME=awiciroh/tethys-ngiab:main +TETHYS_IMAGE_NAME=awiciroh/tethys-ngiab:dev-r1 GEOSERVER_IMAGE_NAME=gioelkin/geoserver:2.25.x DATA_FOLDER_PATH="$1" TETHYS_PERSIST_PATH="/var/lib/tethys_persist" @@ -562,6 +562,5 @@ fi check_last_path "$@" - create_tethys_portal From b6516e046bdfe78c3d59b9c8b248012e2e7f074d Mon Sep 17 00:00:00 2001 From: romer8 Date: Wed, 29 May 2024 16:42:26 -0600 Subject: [PATCH 3/3] now persist the prompt if no correct output is given --- viewOnTethys.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/viewOnTethys.sh b/viewOnTethys.sh index 84839b4..7a93380 100755 --- a/viewOnTethys.sh +++ b/viewOnTethys.sh @@ -501,8 +501,23 @@ _run_tethys(){ # Create tethys portal create_tethys_portal(){ - echo -e "${YELLOW}Visualize outputs using the Tethys Platform (https://www.tethysplatform.org/)? (y/N, default: y):${RESET}" - read -r visualization_choice + while true; do + echo -e "${YELLOW}Visualize outputs using the Tethys Platform (https://www.tethysplatform.org/)? (y/N, default: y):${RESET}" + read -r visualization_choice + + # Default to 'y' if input is empty + if [[ -z "$visualization_choice" ]]; then + visualization_choice="y" + fi + + # Check for valid input + if [[ "$visualization_choice" == [YyNn]* ]]; then + break + else + echo -e "${RED}Invalid choice. Please enter 'y' for yes, 'n' for no, or press Enter for default (yes).${RESET}" + fi + done + # Execute the command if [[ "$visualization_choice" == [Yy]* ]]; then echo -e "${GREEN}Setup Tethys Portal image...${RESET}" @@ -523,10 +538,10 @@ create_tethys_portal(){ _open_browser _pause_script_execution else - printf "${RED}Failed to prepare Tethys portal.${RESET}\n" + echo -e "${RED}Failed to prepare Tethys portal.${RESET}\n" fi else - printf "${CYAN}Skipping Tethys visualization setup.${RESET}\n" + echo -e "${CYAN}Skipping Tethys visualization setup.${RESET}\n" fi }