Skip to content

khussa1n/Goods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goods Application

By Khussain Kudaibergenov | Хусаин Кудайбергенов

How to Run

  1. Make sure you have Docker and Docker Compose installed on your system.

  2. Clone this repository

  3. Run

    docker-compose up --build
    

This repository contains a Docker Compose setup for the Goods application, which consists of several services: PostgreSQL, Redis, ClickHouse, NATS, Gin server, and Golang Server which connected to clickhouse.

Swagger Documantation

http://localhost:8081/swagger/index.html

Services

PostgreSQL

  • Main DB
  • Port: 5437 (host) mapped to 5432 (container)

Redis

  • DB for cache
  • Port: 6380 (host) mapped to 6379 (container)

ClickHouse

  • DB for data logs
  • Port: 9001 (host) mapped to 9000 (container)
  • For connecting
    clickhouse-client --host localhost --port 9001 --user clickhouse --password clickhouse
    

NATS

  • Message broker between Gin server and ClickHouse
  • Port: 4223 (host) mapped to 4222 (container)

Gin server with PostgreSQL and Redis

  • Build: ./app_sender
  • Port: 8081 (host) mapped to 8080 (container)

Golang server with ClickHouse

  • Build: ./app_receiver
  • Port: 8082 (host) mapped to 8082 (container)
  • Batch size for inserting to Clickhouse is 2

Releases

No releases published

Packages

No packages published

Languages