Giter VIP home page Giter VIP logo

microservices's Introduction

STREAMING PLATFORM - MICROSERVICES

A streaming platform developed using Microservices architecture. (currently in development)

TECHNOLOGIES

  • Golang (v1.22)
  • NodeJS (v20)
  • PostgreSQL (v14)
  • Redis (v7.2)

FEATURES

  • Docker/Docker Compose
  • API Gateway
  • Authentication Service
  • User Service
  • Video Streaming Service
  • Tests
  • CI/CD (Github Actions)

SETUP

Once you've cloned the repo, you have two options for setting it up: you can either use Docker (recommended), or run each service locally. Additionally, a Makefile is included with commands to streamline the setup process. However, if you don't have make installed on your system then you can use alternative instructions provided in this readme.

Docker/Docker Compose

Make sure you have docker and docker compose (not docker-compose) installed on your system.

Clone all microservices:

make clone

Alternative (if make is not available):

git clone https://github.com/SagarMaheshwary/microservices-api-gateway
git clone https://github.com/SagarMaheshwary/microservices-authentication-service
git clone https://github.com/SagarMaheshwary/microservices-user-service

Create .env file from .env.docker-example in each service:

make copy-docker-env

Alternative: (use powershell if running on windows)

cp ./microservices-api-gateway/.env.docker-example ./microservices-api-gateway/.env
cp ./microservices-authentication-service/.env.docker-example ./microservices-authentication-service/.env
cp ./microservices-user-service/.env.docker-example ./microservices-user-service/.env

Download and build all required Docker images:

make build

Alternative:

docker compose build

You can also use the below command to rebuild images after making changes to any microservice like installing or removing a dependency.

make rebuild

Alternative:

docker compose up --build --force-recreate

Every service is mounted with a volume which means any changes to the code will be automatically synced to the container so that we don't restart containers manually.

Start all Docker containers:

make up

Alternative:

docker compose up --build --force-recreate

Access the microservices at localhost:3000.

To run containers in the background:

make up-detached

Alternative:

docker compose up -d

To stop the containers:

make down

Alternative:

docker compose down

LOCAL

Each microservice repo contains instructions for local setup.

Clone all microservices:

make clone

Alternative (if make is not available):

git clone https://github.com/SagarMaheshwary/microservices-api-gateway
git clone https://github.com/SagarMaheshwary/microservices-authentication-service
git clone https://github.com/SagarMaheshwary/microservices-user-service

Create .env files with default values from .env.example:

make copy-local-env

Alternative: (use powershell if running on windows)

cp ./microservices-api-gateway/.env.example ./microservices-api-gateway/.env
cp ./microservices-authentication-service/.env.example ./microservices-authentication-service/.env
cp ./microservices-user-service/.env.example ./microservices-user-service/.env

Update .env files with your local system configuration.

APIs

Checkout the microservices-api-gateway repo for available apis listing, examples, and Postman collection.

microservices's People

Contributors

sagarmaheshwary avatar

Watchers

 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.