Sign inSign up

llsjllsj/demo-spring-boot

By llsjllsj

•Updated about 5 years ago

Spring boot app with environment variable

Image
0

1.1K

llsjllsj/demo-spring-boot repository overview

⁠demo-spring-boot

This image is a simple spring boot application that have 2 basic environment variable

⁠Docker

To run this image

docker run -d -p 8080:8080  llsjllsj/demo-spring-boot

To run this image with environment variable

docker run -d -p 8080:8080  llsjllsj/demo-spring-boot -e db.username='admin' -e db.password='password'
⁠Kubernetes:

Create single pod - without a deployment:

$ kubectl run demo-spring-boot --image=llsjllsj/demo-spring-boot

Create a deployment:

$ kubectl create deployment demo-spring-boot --image=llsjllsj/demo-spring-boot

Note: You can pass additional parameter --namespace=<your-desired-namespace> to the above kubectl commands.

⁠Endpoint

http://localhost:8080/hello⁠

Hello Jay DevOps

http://localhost:8080/db⁠

{"db_user":"admin","db_password":"password"}

Tag summary

Content type

Image

Digest

Size

242.8 MB

Last updated

about 5 years ago

docker pull llsjllsj/demo-spring-boot