wescale / microservices-demo

Microservice demo project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microservices demo

This is a sample application that demonstrates a microservice architecture.

Architecture

Architecture diagram

The application is composed of the following microservices:

  • article-service: Golang application that manages the articles.
    • Connected to a MongoDB database.
      • GET /healthz
      • GET /article/
      • POST /article/
      • DELETE /article/:articleId/
  • cart-service: Golang application that manages the shopping cart.
    • Connected to a Redis database.
      • GET /healthz
      • GET /cart/:cartId/
      • PUT /cart/:cartId/
      • DELETE /cart/:cartId/
  • User frontend: Vuejs application that serves as the frontend.
    • GET /
    • GET /shop
    • GET /cart
  • Admin frontend: Vuejs application that serves as the admin frontend.
    • GET /
    • GET /articles
    • GET /about

Run the application

docker-compose

A docker-compose file is provided at the root of the repository to run the application.

docker-compose up -d

Publish

To publish all the container images to the GCP training registry, just run the following commands:

gcloud auth configure-docker europe-west1-docker.pkg.dev
docker-compose -f docker-compose-push.yml build
docker-compose -f docker-compose-push.yml push

Kubernetes

In a near future :)

About

Microservice demo project


Languages

Language:Go 33.0%Language:Vue 26.1%Language:TypeScript 25.3%Language:Dockerfile 6.6%Language:Smarty 4.9%Language:HTML 1.7%Language:JavaScript 1.3%Language:SCSS 1.1%