47 lines
1 KiB
Makefile
47 lines
1 KiB
Makefile
# 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
|