Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khussa1n/goods
https://github.com/khussa1n/goods
clickhouse go nats postgres redis
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/khussa1n/goods
- Owner: khussa1n
- Created: 2024-03-07T04:10:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-08T15:19:17.000Z (10 months ago)
- Last Synced: 2024-03-09T06:39:18.428Z (10 months ago)
- Topics: clickhouse, go, nats, postgres, redis
- Language: Go
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
docker-compose up --buildThis 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
```bash
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