Skip to content

E-wave112/cowry-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cowry-service

A simple microservices books management system developed using FastAPI, postgres and Docker

  • To acommplish a fully managed microservices architecture setup, the books service (with it's own database) is created seperately as opposed to using a shared books database between the client and the admin.

  • The services are routed to the same ports using Nginx which in this case serves as both a reverse-proxy and api gateway

  • the services communicate to each other via http using the requests library (you might want to consider using a more robust approach (events/message-brokers) like Redis, RabbitMQ, Kafka e.t.c)

Build the initial docker images for your services

In the root of your project, run the command

 docker-compose up -d

Running the Dev Docker container

To start the container of each service, use the following command:

 docker-compose up

Please find the links to the docker images for each of the services below:

Running Tests

  • This project uses pytest for running tests
  • You can test out each services (e.g client) by running the commands
 cd <service_name>

then run the test

 pytest

NB: It is assumed that the seeded data is actually in the database server of each service

Foot notes

  • It is not recommended to use alpine based images for this project(or most of other python projects) and here's why

  • A useful resource on how to push your docker image to DockerHub can be found here

About

A simple books management system microservices developed using FastAPI,postgres and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published