Skip to content

Commit

Permalink
fix lightsail.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyankg101 committed Oct 16, 2023
1 parent 6bad513 commit 3e4e690
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/tvarit/conf/prod/lightsail.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
echo "executing user data"
sudo su
apt update
apt install docker.io -y
Expand All @@ -7,10 +8,7 @@ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip
apt install unzip -y
unzip awscliv2.zip
./aws/install
while ! command -v aws &> /dev/null
do
sleep 1
done
sleep 300
rm -rf awscliv2.zip

#with only ECR pull access. TODO: update
Expand All @@ -26,3 +24,4 @@ docker pull 250373516626.dkr.ecr.eu-central-1.amazonaws.com/lightsailinstance:la
docker images >> test.txt #for testing
#docker run -d -p 3000:3000 grafana/grafana
docker run -d -p 80:3000 250373516626.dkr.ecr.eu-central-1.amazonaws.com/lightsailinstance:latest
echo "user data executed"
4 changes: 2 additions & 2 deletions .github/tvarit/deploy_to_dev_16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ aws ecr get-login-password --region eu-central-1 | docker login --username AWS -
docker tag grafana/grafana:latest 250373516626.dkr.ecr.eu-central-1.amazonaws.com/lightsailinstance:latest
docker push 250373516626.dkr.ecr.eu-central-1.amazonaws.com/lightsailinstance:latest

new_instance_name=grafana-${PREFIX}
instance_name=grafana-${PREFIX}-new
instance_name=grafana-${PREFIX}
new_instance_name=grafana-${PREFIX}-new

# Check if previous instance exists
return_value_instance=$(validate_lightsail_instance $instance_name)
Expand Down

0 comments on commit 3e4e690

Please sign in to comment.