Created
May 4, 2021 18:09
-
-
Save jamesward/aa41fbdabc1b58152828018dedef9711 to your computer and use it in GitHub Desktop.
Spring Boot Cloud Run Deploy
This file contains hidden or 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
mkdir tmp | |
cd tmp | |
curl -sL https://start.spring.io/starter.zip -d bootVersion=2.4.5 -d dependencies=web -o demo.zip; unzip demo.zip; rm demo.zip | |
echo "hello, world" > src/main/resources/static/index.html | |
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=gcr.io/jw-demo/springboot-demo -Dspring-boot.build-image.builder=gcr.io/buildpacks/builder:v1 | |
docker push gcr.io/jw-demo/springboot-demo | |
gcloud run deploy --project=jw-demo --platform=managed --region=us-central1 --image=gcr.io/jw-demo/springboot-demo --allow-unauthenticated --memory=1Gi springboot-demo | |
cd .. | |
#rm -rf tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment