Skip to content

awtb/infra-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infra kit

Local development infrastructure: PostgreSQL, Redis, Adminer, pgAdmin, RabbitMQ (optional), VictoriaMetrics stack with vmagent (optional), Vector log collector (optional). Managed via docker compose.

Requirements

  • Docker
  • Make

Quick start

cp .env.example .env
make up

Services & ports

Databases

  • PostgreSQL: POSTGRES_PORT (default 5432)
  • Redis: REDIS_PORT (default 6379)

Queues

  • RabbitMQ (optional profile mq): 5672 (AMQP), 15672 (UI)

Admin tools

  • Adminer (optional profile adminer): ADMINER_PORT (default 8080)
  • pgAdmin (optional profile pgadmin): 8035 (UI)

Storage

  • MinIO (optional profile storage): MINIO_PORT (default 9000, S3 API), MINIO_CONSOLE_PORT (default 9001, UI)

Observability

  • VictoriaMetrics (optional profile metrics): VICTORIA_METRICS_PORT (default 8428, UI at /vmui)
  • vmagent (optional profile metrics): VMAGENT_PORT (default 8429, Prometheus scraper/forwarder for VictoriaMetrics)
  • VictoriaLogs (optional profile metrics): VICTORIA_LOGS_PORT (default 9428)
  • Grafana (optional profile metrics): GRAFANA_PORT (default 3000)
  • Vector (optional profile metrics): collects Docker logs and sends them to VictoriaLogs
  • Metrics/logging endpoints are configurable via .env: VMAGENT_REMOTE_WRITE_URL, VMAGENT_SCRAPE_JOB_NAME, VMAGENT_SCRAPE_PATH, VMAGENT_SCRAPE_TARGET, VECTOR_VICTORIA_LOGS_URI

Common commands

make up # starts postgres + redis
make down
make restart
make reset

Optional services

make up-adminer
make up-pgadmin
make up-mq
make up-minio
make up-metrics
make up-logs
make up-grafana
make up-vector

Metrics stack

make up-metrics starts VictoriaMetrics, VictoriaLogs, vmagent, Vector, and Grafana.

vmagent scrapes a single target configured via .env:

VMAGENT_SCRAPE_JOB_NAME=app
VMAGENT_SCRAPE_PATH=/metrics
VMAGENT_SCRAPE_TARGET=host.docker.internal:8000

Vector forwards Docker logs to VictoriaLogs. Its sink endpoint is configurable via:

VECTOR_VICTORIA_LOGS_URI=http://victoria_logs:9428/insert/jsonline

Start a specific service

make up-service-name

Wipe data for a service

make wipe-postgres
make wipe-redis
make wipe-rabbitmq
make wipe-vm
make wipe-grafana
make wipe-service-name

Wipe all data

make wipe-all

Get into psql

make psql

About

Local development infrastructure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors