Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gailo22/payment-service

Spring boot java, kubernetes
https://github.com/gailo22/payment-service

hacktoberfest hacktoberfest2020 hactoberfest2023 kubernetes microservices mongodb sprintboot

Last synced: 16 days ago
JSON representation

Spring boot java, kubernetes

Awesome Lists containing this project

README

        

# Payment Service application

### Build jar
```
$ ./gradlew build

```

### Run mongodb service
```
$ openssl rand -base64 741 > key.txt

$ kubectl create secret generic shared-bootstrap-data --from-file=internal-auth-mongodb-keyfile=key.txt

$ kubectl exec -it mongod-0 -c mongod-container bash

$ mongo

```

### Build docker image
```
$ eval $(minikube docker-env)

$ docker build -t payment-service .

$ docker run -v ${PWD}/tmp:/tmp -p 9090:8080 payment-service

```

### Deploy to Kubernetes
```
$ kubectl run payment-service --image=payment-service --replicas=1

$ kubectl apply -f workloads.yml

$ kubectl apply -f services.yml

or

$ kubectl expose deployment payment --type=NodePort
```

### Access service via minikube
```
$ minikube service payment --url
http://192.168.99.100:30230

$ curl http://192.168.99.100:30230/pay/123
```