From a5d1d034fd1bcd325855a99a8f4796827d337ad1 Mon Sep 17 00:00:00 2001 From: leej3 Date: Wed, 31 Jul 2024 18:02:56 +0100 Subject: [PATCH] fix key path --- web_api/.env.template | 1 + web_api/deploy.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web_api/.env.template b/web_api/.env.template index 07a259d2..45910300 100644 --- a/web_api/.env.template +++ b/web_api/.env.template @@ -10,3 +10,4 @@ # S3_BUCKET="osm-storage" # MONGODB_URI="your-mongodb-uri" # DOMAIN="osm.nimh.nih.gov" +# SSH_KEY_PATH=/home/user/.ssh/... # Path to the SSH key used to access the EC2 instance diff --git a/web_api/deploy.sh b/web_api/deploy.sh index ee3da14e..fe0abd4b 100755 --- a/web_api/deploy.sh +++ b/web_api/deploy.sh @@ -14,6 +14,7 @@ if [ -f .env ]; then exit 1 fi +echo ${SSH_KEY_PATH} # Log in to Docker Hub echo "Logging in to Docker Hub..." @@ -50,7 +51,7 @@ popd # Deploy Docker Compose on the instance echo "Deploying Docker Compose on the instance..." -ssh -o StrictHostKeyChecking=no -i dsst2023.pem ubuntu@$public_dns -p 2222 << EOF +ssh -o StrictHostKeyChecking=no -i $SSH_KEY_PATH ubuntu@$public_dns -p 2222 << EOF mkdir -p ~/app cd ~/app echo "$(<./web_api/compose.yaml)" > compose.yaml