Git Product home page Git Product logo

custom-microservices-project's Introduction

custom-microservices-project

Simple microservices POC based on the Spring Cloud and Java 18, to try microservices architecture patterns and technologies.

Project structure:

  • apigw - spring cloud gateway
  • commons - common microservices code
  • config-server - spring cloud config server, for storing services properties in one place
  • consumer - consumer service
  • eureka-server - discovery service, for simple communication between services
  • fraud - service for checking if the consumer is fraudster

Local Setup

Keycloak host

We need to add a host mapping for keycloak. It is crucial because keycloak is relay on the host. If you will run one service from localhost and keycloak from docker - authentication will not work. Because the keycloak host on docker will be: http://keycloak but in browser it will be: http://locahost

Add next items to the hosts

sudo nano /etc/hosts

127.0.0.1 keycloak

Create databases

For customer and fraud service we need to create a databases(it will be automated in future updates). It should be customer and fraud databases.

Run the Project

To run docker containers, just run from the docker: docker compose up

HOWTO

Docker

How to create a docker image

  • add a dockerfile to the project
  • docker build --tag=<repository-name> . - to build an image
  • docker push <repository-name> - push an image to the dockerhub

UPDATE SERVICE PROPERTIES DYNAMICALLY

To update service properties dynamically (without service redeploy) you need:

GENERAL

EUREKA

GRPC And Protobuf

CIRCUIT BREAKER

SPRING WEB

GATEWAY

SPRING SECURITY

OAUTH2

CONFIG SERVER

ZIPKIN TRACING

SPRING CLOUD BUS

ELK CENTRALIZED LOGGING

CENTRALIZED MONITORING

PROPERTIES ENCRYPTION/DECRYPTION

to encrypt a property just send a POST to http://localhost:8010/encrypt (where http://localhost:8010 is the config-server's endpoint)

custom-microservices-project's People

Contributors

dtimchenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.