Home | RU | EN

Local Deployment

  1. Download the docker-compose.yml file from GitHub using the link below and run it with the command docker-compose up -d.

Download docker-compose.yml from GitHub for Windows
Download docker-compose.yml from GitHub for MacBook (Intel)
On the opened GitHub page, click the button on the right "Download raw file".
Note: this docker-compose file is quite large because I’ve hardcoded all ELK, Prometheus and Grafana configs into it, so you don’t need to create separate configuration files — everything will start with a single command.

Frontend will be available at http://localhost

Swagger at http://localhost:8088/swagger-ui/index.html

Kafka UI at: http://localhost:8089 (admin, admin)

MailHog (web interface for viewing sent emails and registration confirmation) at: http://localhost:8025

Kibana (web interface for viewing logs) at: http://localhost:5601
To display logs in Kibana, you need to configure indices (create so-called Data views) directly in the Kibana graphical interface. In the Discover tab when first opened.
Index patterns: main-app-logs-* and analytics-service-logs-*

Prometheus (monitoring system and metrics collection) at: http://localhost:9090/query

Grafana (web interface for metrics visualization) at: http://localhost:3001/d/application-metrics/application-metrics-dashboard?orgId=1&from=now-5m&to=now&timezone=browser&refresh=5s (admin, admin)

PostgreSQL (connection via any client, e.g. DBeaver):
IP: localhost:5432
Database: spring_digital_bookstore
Username: admin
Password: admin

Admin credentials in the application:
Login: admin@gmail.com
Password: admin

Want to learn how Kafka interaction works in this application? Read detailed description

  1. If you want payment features, ask reviews from users (actually from AI) and tech support to work, you need to create a .env file in the same directory where docker-compose.yml is located and specify the following variables in it, but you will have to obtain the values yourself (it's free, but will take an extra 15–20 minutes of your time).
# This is how your .env file should look, but the values for these variables should be yours!

OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...

TELEGRAM_BOT_TOKEN=68915...
TELEGRAM_CHAT_ID=14310...

Instructions for setting up keys and services

1. OpenAI — getting OPENAI_API_KEY

  1. Go to: https://platform.openai.com/settings/organization/api-keys
  2. Create an organization (if you don't have one yet) at https://platform.openai.com/settings/organization/general. Any name will do
  3. Click Create new secret key
  4. Copy the key:
OPENAI_API_KEY=sk-proj-...

For free usage:

  1. Go to: https://platform.openai.com/settings/organization/data-controls/sharing
  2. Enable the Enable for all projects option

2. Gemini — getting GEMINI_API_KEY

  1. Go to: https://aistudio.google.com/app/api-keys
  2. Create a new key Create API key
  3. Copy:
GEMINI_API_KEY=AIzaSy...

Note: Gemini's free quota is very small (about 20 requests per month for the model used in this application)
If you don't specify GEMINI_API_KEY, "uncensored reviews" won't work

3. Telegram — settings for notifications

3.1 Getting TELEGRAM_BOT_TOKEN

  1. In Telegram, find @BotFather
  2. Send /newbot
  3. Name the bot
  4. Copy the token:
TELEGRAM_BOT_TOKEN=123456:ABC-DEF...

3.2 Getting TELEGRAM_CHAT_ID

Fastest way:

  1. In Telegram, find @userinfobot
  2. Send it /start
  3. In the response, it will show your Chat ID
  4. Paste it into the variable:
TELEGRAM_CHAT_ID=123456789

4. Example of final .env file

OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...

TELEGRAM_BOT_TOKEN=your-telegram-bot-token
TELEGRAM_CHAT_ID=123456789