Skip to content

An example of microservice-based and docker-containerized web backend app

Notifications You must be signed in to change notification settings

Baja-KS/Microservice-based-example-web-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice based example web backend

An example of microservice-based and docker-containerized web backend app

Services:

  • Product Service (FastAPI,PostgreSQL)
  • Order Service (FastAPI,PostgreSQL)

Run:

  • Run docker-compose up -d (or sudo docker-compose up -d) in the main app directory
  • App will start only after the databases have been created,after few seconds or so if they havent been (if there are no db service volumes)
  • Product Service is on port 8002 -- Product Service Docs
  • Order Service is on port 8001 -- Order Service Docs

Migrations:

  • Alembic migration tool used for product and order services
  • Adding new migration script: (sudo) docker-compose run <servicename (product_service,order_service)> alembic revision --autogenerate -m "<filename>"
  • Running migrations : (sudo) docker-compose run <servicename (product_service,order_service)> alembic upgrade head

TODO:

  • Authentication
  • More services with different frameworks and databases
  • Communication between services where necessary (example:updating product quantity when order is made)

About

An example of microservice-based and docker-containerized web backend app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published