Skip to content

A example microservice which connects to a mongo database

Notifications You must be signed in to change notification settings

neelp1/pets-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pets-app

This API will be a microservice for a example pets store website and will handle the pet data processing. pets-app will connect to a mongo database.

Run on kubernetes

Build the images

docker build -t pets-app:prod .

Start kubeadm via Docker Desktop

kubectl apply -f kube/

Destroy kubeadm containers:

kubectl delete -f kube/

Build & Run using 3 musketeers pattern

Create .env file for mongo credentials.

If you want to build:

make build

Create pets network (one time):

make network

To run it:

make start

Go to localhost:3001 to see the message. You can also do a healthcheck at localhost:3001/healthcheck.

If you want to stop and remove the containers:

make down

quick mongo cli commands

https://docs.mongodb.com/manual/reference/mongo-shell/

make mongo_exec
$ mongosh -u <username> -p <password>
> show dbs
> use <db>
> show collections
> db.<collection>.find()

Upcoming features

  • Github Actions workflow

About

A example microservice which connects to a mongo database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •