feat: moved project from lab2

This commit is contained in:
TAskMAster339
2026-10-10 12:14:31 +03:00
parent 0ab3a341aa
commit a856733fe9
59 changed files with 5346 additions and 1 deletions
+29 -1
View File
@@ -2,13 +2,41 @@ PYTHON ?= python3
BASE_URL ?= http://localhost:8080
CA_FILE ?=
ACTION_SCRIPT ?=
COMPOSE = docker compose --project-name highload-lab3 --env-file .env -f compose.yml
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence test-failover
.PHONY: help app-up app-down app-logs app-status test-backend test-baseline test-baseline-persistence check validate test load test-persistence test-failover
help:
@echo "app-up: prepare local environment, build and start API, PostgreSQL, Redis and frontend"
@echo "app-down: stop application; keep database and session volumes"
@echo "app-logs / app-status: inspect application"
@echo "test-backend: Go race tests against PostgreSQL and Redis"
@echo "test-baseline / test-baseline-persistence: transferred lab2 API; second target stops and starts lab3"
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
app-up:
$(PYTHON) scripts/init_env.py
$(COMPOSE) up -d --build --wait
app-down:
$(COMPOSE) down
app-logs:
$(COMPOSE) logs -f
app-status:
$(COMPOSE) ps
test-backend:
$(COMPOSE) --profile test run --build --rm backend-tests
test-baseline:
$(PYTHON) scripts/check_baseline.py --base-url "$(BASE_URL)"
test-baseline-persistence:
$(PYTHON) scripts/check_baseline.py --base-url "$(BASE_URL)" --restart
check:
$(PYTHON) scripts/check_contract.py