From edc876d62aa9a99dc5ca140cf2c97c4dbfb3cab2 Mon Sep 17 00:00:00 2001 From: lwj9812 <141805156+lwj9812@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:00:06 +0900 Subject: [PATCH] Create run_process.sh --- deploy/scripts/run_process.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 deploy/scripts/run_process.sh diff --git a/deploy/scripts/run_process.sh b/deploy/scripts/run_process.sh new file mode 100644 index 000000000..b972f1aed --- /dev/null +++ b/deploy/scripts/run_process.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +REGION="ap-northeast-2" +ECR_REPOSITORY="257307634175.dkr.ecr.ap-northeast-2.amazonaws.com" +ECR_DOCKER_IMAGE="${ECR_REPOSITORY}/aws01-spring-petclinic" +ECR_DOCKER_TAG="latest" + +aws ecr get-login-password --region ${REGION} \ + | docker login --username AWS --password-stdin ${ECR_REPOSITORY}; + +export IMAGE=${ECR_DOCKER_IMAGE}; +export TAG=${ECR_DOCKER_TAG}; +cd /home/ubuntu/deploy +docker-compose up -d --build;