-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,21 @@ set -e | |
# Getting permissions errors on local when trying to push? Run this: | ||
# gcloud auth configure-docker us-central1-docker.pkg.dev | ||
|
||
|
||
# Run on initial instance creation: | ||
# > sudo apt-get update | ||
# > sudo apt-get install podman | ||
|
||
make webapp-linux | ||
|
||
docker buildx build --platform linux/amd64 --build-arg BIN=bin/linux_amd64/webapp -t us-central1-docker.pkg.dev/ian-rose/docker-1/webapp:latest . | ||
HOST_IP=$(gcloud compute --project ian-rose instances describe instance-1 --zone us-central1-a --format "get(networkInterfaces[0].accessConfigs.natIP)") | ||
|
||
#docker buildx build --platform linux/amd64 --build-arg BIN=bin/linux_amd64/webapp -t us-central1-docker.pkg.dev/ian-rose/docker-1/webapp:latest . | ||
#docker build -t us-central1-docker.pkg.dev/ian-rose/docker-1/webapp:latest . | ||
docker push us-central1-docker.pkg.dev/ian-rose/docker-1/webapp:latest | ||
#docker push us-central1-docker.pkg.dev/ian-rose/docker-1/webapp:latest | ||
|
||
ssh ianrose14@34.66.56.67 mkdir -p config/ | ||
scp config/* ianrose14@34.66.56.67:config/ | ||
scp scripts/startup.sh ianrose14@34.66.56.67: | ||
gcloud compute --project ian-rose ssh ianrose14@instance-1 --zone us-central1-a -- mkdir -p config/ | ||
gcloud compute --project ian-rose scp --zone us-central1-a config/* ianrose14@instance-1:config/ | ||
gcloud compute --project ian-rose scp --zone us-central1-a scripts/startup.sh ianrose14@instance-1: | ||
|
||
#scp bin/linux_amd64/webapp [email protected]: | ||
ssh [email protected] bash ./startup.sh | ||
ssh ianrose14@"${HOST_IP}" bash ./startup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters