Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamesward/hello-kotlin-springboot
https://github.com/jamesward/hello-kotlin-springboot
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/jamesward/hello-kotlin-springboot
- Owner: jamesward
- License: apache-2.0
- Created: 2020-03-16T19:45:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-15T00:19:34.000Z (almost 4 years ago)
- Last Synced: 2024-08-03T01:11:53.151Z (3 months ago)
- Language: Kotlin
- Size: 54.7 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cloud-run - Kotlin Spring Boot
README
# Hello Kotlin Spring Boot
Run Locally:
```
./mvnw spring-boot:run
```Deploy on Google Cloud Run:
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
Set GCP `PROJECT_ID`:
```
export PROJECT_ID=YOUR_GCR_PROJECT
```Create a JVM Container Image:
```
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=gcr.io/$PROJECT_ID/hello-kotlin-springboot
```Or create a GraalVM Native Image Container Image:
```
./mvnw spring-boot:build-image -Pnative -Dspring-boot.build-image.imageName=gcr.io/$PROJECT_ID/hello-kotlin-springboot
```Local Docker Run:
```
docker run -p8080:8080 gcr.io/$PROJECT_ID/hello-kotlin-springboot
```Manually Deploy on Cloud Run:
```
docker push gcr.io/$PROJECT_ID/hello-kotlin-springbootgcloud run deploy \
--image=gcr.io/$PROJECT_ID/hello-kotlin-springboot \
--memory=1Gi \
--cpu=2. \
--platform=managed \
--allow-unauthenticated \
--project=$PROJECT_ID \
--region=us-central1 \
hello-kotlin-springboot
```