diff --git a/core/scripts/init.sh b/core/scripts/init.sh index 653b5ae..c96bcc4 100755 --- a/core/scripts/init.sh +++ b/core/scripts/init.sh @@ -114,6 +114,16 @@ printf "\n" echo -e "${ORANGE}Send a PUSH in Manage, which pushes the entities to EngineBlock and OIDCNG ${VINKJE}" docker compose exec managegui curl -q -s -k -u sysadmin:secret $manageurl/push >/dev/null +printf "\n" +echo -e "${ORANGE}Restarting managegui to reload Shibboleth SP metadata${NOCOLOR}" +docker compose restart managegui +echo -ne "Waiting for managegui to be ready..." +until docker compose exec managegui curl -s -o /dev/null -w '%{http_code}' http://localhost/ 2>/dev/null | grep -qE '^[^5]'; do + echo -n "." + sleep 1 +done +echo -e " ${VINKJE}" + printf "\n" echo -e "${BLUE}Please add the following line to your /etc/hosts: ${VINKJE}" printf "\n" diff --git a/core/start-dev-env.sh b/core/start-dev-env.sh index 0044995..5347ca1 100755 --- a/core/start-dev-env.sh +++ b/core/start-dev-env.sh @@ -34,6 +34,7 @@ docker_compose_options=() # Array to hold the options for docker compose docker_compose_options+=("-f") docker_compose_options+=("${SCRIPT_DIR}/docker-compose.yml") docker_compose_options+=("--profile" "oidc") +docker_compose_options+=("--profile" "test") # Show help hint if no arguments are given if [ $# -eq 0 ]; then diff --git a/core/stop-dev-env.sh b/core/stop-dev-env.sh index ee25aa6..a94d5df 100755 --- a/core/stop-dev-env.sh +++ b/core/stop-dev-env.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# Use docker compose to start the environment but with the modified override file(s) +# Use docker compose to stop the environment. echo -e "Stopping the dev environment with the following command:\n" -command='docker compose --profile oidc --profile extras --profile invite --profile php --profile dashboard --profile sbs -f docker-compose.yml down' +command="docker compose --profile oidc --profile test --profile extras --profile invite --profile php --profile dashboard --profile sbs -f docker-compose.yml down --remove-orphans $*" echo "$command" exec $command diff --git a/stepup/stop-dev-env.sh b/stepup/stop-dev-env.sh index 9f9326a..33eb6cb 100755 --- a/stepup/stop-dev-env.sh +++ b/stepup/stop-dev-env.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Use docker compose to start the environment but with the modified override file(s) -echo -e "Starting the dev environment with the following command:\n" +# Use docker compose to stop the environment. +echo -e "Stopping the dev environment with the following command:\n" -echo -e "docker compose --profile smoketest -f docker-compose.yml down\n" -docker compose --profile smoketest -f docker-compose.yml down +echo -e "docker compose --profile smoketest -f docker-compose.yml down --remove-orphans $*\n" +docker compose --profile smoketest -f docker-compose.yml down --remove-orphans $*