- Microservice architecture
- gRPC between services
- Fast serialization with MessagePack
- Access and refresh JWT tokens
- Active sessions control
- Multipart file upload & download
- Emails with new login info
- Main DB - PostgreSQL
- DB for cache - Redis
- S3 for files and logs - MinIO
- Message broker between Gateway and Mail service - Apache Kafka
- Monitoring - Prometheus & Grafana
- Log aggregation - Promtail & Loki & Grafana
Note
API located at /api
Docs located at /api/docs, but Swagger does not support MessagePack, so use another tool to send requests with this content type
Grafana located at /admin/grafana
- Docker
-
Copy
.envfile fromexamples/dev/todev/folder and fill it in -
(For dev/prod) Copy
redis.conffile fromexamples/todev/orprod/folder and fill it in -
(For prod) Copy
.envfile fromexamples/prod/toprod/folder and fill it in -
(For prod) Copy
nginx.conffile fromexamples/prod/toprod/folder and fill it in -
(For prod) Copy
docker-compose.cert.ymlfile fromexamples/prod/toprod/folder and fill it in
-
Run the dev ver.
-
Only API
docker compose -f docker-compose.dev.yml --profile api up --build -d
-
API + monitoring
docker compose -f docker-compose.dev.yml --profile all up --build -d
-
-
Run the prod ver. and get a SSL certificate
-
Create the directory on the server
mkdir -p /cloud_storage/
-
Use SCP to copy the prod files to the server
scp -r ./prod/* <username>@<host>:/cloud_storage/
-
Run the deploy script
bash deploy.sh
-
docker compose -f docker-compose.<dev/prod>.yml stop- Install Locust
pip install locust- Run the script
locust --host localhost -f ./load_testing/load_test.py- Open the console
