From 01811176e095e01786cfa9a9f9f82ca82008265b Mon Sep 17 00:00:00 2001 From: ubc-tuehoang <86985864+ubc-tuehoang@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:27:30 +0000 Subject: [PATCH] updating code to test route for UBCCWL --- app/config/routes.php | 2 ++ docker-push-tag.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 docker-push-tag.sh diff --git a/app/config/routes.php b/app/config/routes.php index cc006710b..6cb60addb 100644 --- a/app/config/routes.php +++ b/app/config/routes.php @@ -58,6 +58,8 @@ // Authentication routes Router::connect('/login', array('plugin' => 'guard', 'controller' => 'guard', 'action' => 'login')); + Router::connect('/loginUBCCWL', array('plugin' => 'guard', 'controller' => 'guard', + 'action' => 'login')); Router::connect('/logout', array('plugin' => 'guard', 'controller' => 'guard', 'action' => 'logout')); Router::connect('/loginout/loginByCWL', array('plugin' => 'guard', 'controller' => 'guard', diff --git a/docker-push-tag.sh b/docker-push-tag.sh new file mode 100755 index 000000000..bd8d96c96 --- /dev/null +++ b/docker-push-tag.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Prompt for user input for the two tags +# This script tags the images based on user input and pushes them to the appropriate Docker repository. + +echo "Enter tag for ipeer-app (e.g., dfd9bb7cdf21):" +read UI_TAG +echo "Enter tag for ipeer-worker (e.g., ed9129e7d204):" +read APP_TAG + +# Define the image names +UI_IMAGE="dangtue2020/ipeer_app" +APP_IMAGE="dangtue2020/ipeer_worker" + +# Tag the Docker images +echo "Tagging images..." +docker tag $UI_TAG $UI_IMAGE:$UI_TAG +docker tag $APP_TAG $APP_IMAGE:$APP_TAG + +# List the Docker images +docker images + +# Push the tagged images to the Docker repository +echo "Pushing images..." +docker push $UI_IMAGE:$UI_TAG +docker push $APP_IMAGE:$APP_TAG + +echo "Docker images tagged and pushed successfully." \ No newline at end of file