justfile and README.md

This commit is contained in:
Rorik Star Platinum 2025-11-04 00:55:00 +03:00
parent c158d1b140
commit 86007d4e09
2 changed files with 196 additions and 0 deletions

47
justfile Normal file
View file

@ -0,0 +1,47 @@
# justfile для проекта
# ========== КОНСТАНТЫ ==========
sops_run := "sops exec-env secrets.yaml"
# ========== БАЗА ДАННЫХ ==========
db-up:
@echo "🗄️ Starting PostgreSQL..."
@{{sops_run}} 'docker compose up -d'
db-down:
@echo "🛑 Stopping PostgreSQL..."
@docker compose down
db-logs:
@docker compose logs -f postgres
db-reset:
@echo "🗑️ Resetting PostgreSQL (deleting all data)..."
@docker compose down -v
@{{sops_run}} 'docker compose up -d'
stop:
@echo "🛑 Stopping all services..."
@docker compose down
# ========== ПРИЛОЖЕНИЕ ==========
run:
@echo "🚀 Starting backend in dev mode..."
@{{sops_run}} 'cargo run'
build:
@echo "🔨 Building release version..."
@{{sops_run}} 'cargo build --release'
test:
@echo "🧪 Running tests..."
@{{sops_run}} 'cargo test'
health:
@echo "🏥 Checking health endpoint..."
@curl http://localhost:3000/api/health
# ========== UTILITY ==========
[default]
list:
@just --list