fix: scale replicas in response, K8s metrics client, quota precheck, auth tests
- Add GetMetrics method to MetricsClient interface and implement cluster metrics API - Add QuotaPrecheck service for validating resource quotas before deployment - Add auth DTO with role/permission models and auth handler tests - Add instance diagnostics: mounted NFS volumes, labels, annotations in pod diagnostics - Update workspace handler with GetWorkspace endpoint and shared-user list - Fix monitoring handler to use correct service method name - Add tail_lines fallback in instance handler for snake_case query params - Update nginx config for SSE log streaming support (no buffering) - Add comprehensive test coverage: auth_service_test, auth_handler_test, auth_dto_test, metrics_client_test, quota_precheck_test - Update error messages for quota validation and instance operations - ModifyModal: fix YAML lineWidth:0, modified keys summary, delta-only submit - InstanceCard: correctly disable scale-minus when replicas <= 0 - SidebarLayout: add hover transition for sidebar items - Update todo.md and lessons.md with latest fixes
This commit is contained in:
49
Makefile
49
Makefile
@ -8,7 +8,7 @@ COMPOSE_BIN ?= docker compose
|
||||
ROOT_COMPOSE := docker-compose.yml
|
||||
COMPOSE := $(COMPOSE_BIN) -f $(ROOT_COMPOSE)
|
||||
|
||||
.PHONY: help install run-2 clean-2 docker-dev docker-prod docker-up docker-down docker-logs docker-ps test
|
||||
.PHONY: help install up restart stop clean run-2 clean-2 docker-dev docker-prod docker-up docker-down docker-logs docker-ps test
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
@ -17,10 +17,14 @@ help:
|
||||
@echo "OCDP commands"
|
||||
@echo "────────────────────────────────────────"
|
||||
@echo " make install Install local Go / frontend dependencies"
|
||||
@echo " make run-2 Build and start full Docker Compose stack in background"
|
||||
@echo " make docker-dev Alias of run-2, kept for old docs / muscle memory"
|
||||
@echo " make docker-prod Alias of run-2"
|
||||
@echo " make docker-up Alias of run-2"
|
||||
@echo " make up Build and start the complete platform: DB + API + web gateway"
|
||||
@echo " make restart Restart the complete platform without removing volumes"
|
||||
@echo " make stop Stop containers, keep volumes"
|
||||
@echo " make clean Stop containers and remove project volumes"
|
||||
@echo " make run-2 Alias of up, kept for old docs / muscle memory"
|
||||
@echo " make docker-dev Alias of up"
|
||||
@echo " make docker-prod Alias of up"
|
||||
@echo " make docker-up Alias of up"
|
||||
@echo " make docker-down Stop containers, keep volumes"
|
||||
@echo " make clean-2 Stop containers and remove project volumes"
|
||||
@echo " make docker-logs Follow Compose logs"
|
||||
@ -37,32 +41,45 @@ install:
|
||||
@echo "→ Installing frontend dependencies"
|
||||
@cd frontend && npm ci
|
||||
|
||||
run-2:
|
||||
up:
|
||||
@echo "→ Building and starting OCDP stack"
|
||||
@$(COMPOSE) up --build -d postgres backend nginx
|
||||
@$(COMPOSE) up --build -d
|
||||
@echo ""
|
||||
@$(COMPOSE) ps
|
||||
@$(COMPOSE) ps -a
|
||||
@echo ""
|
||||
@echo "Web: http://localhost:$${WEB_HTTP_PORT:-18080}"
|
||||
@echo "Backend: http://localhost:$${BACKEND_PORT:-18081}/health"
|
||||
|
||||
docker-dev: run-2
|
||||
restart:
|
||||
@echo "→ Restarting OCDP stack"
|
||||
@$(COMPOSE) up --build -d --force-recreate
|
||||
@$(COMPOSE) ps -a
|
||||
|
||||
docker-prod: run-2
|
||||
|
||||
docker-up: run-2
|
||||
|
||||
docker-down:
|
||||
stop:
|
||||
@$(COMPOSE) down --remove-orphans
|
||||
|
||||
clean-2:
|
||||
clean:
|
||||
@$(COMPOSE) down -v --remove-orphans
|
||||
|
||||
run-2: up
|
||||
|
||||
docker-dev: up
|
||||
|
||||
docker-prod: up
|
||||
|
||||
docker-up: up
|
||||
|
||||
docker-down:
|
||||
@$(MAKE) stop
|
||||
|
||||
clean-2:
|
||||
@$(MAKE) clean
|
||||
|
||||
docker-logs:
|
||||
@$(COMPOSE) logs -f
|
||||
|
||||
docker-ps:
|
||||
@$(COMPOSE) ps
|
||||
@$(COMPOSE) ps -a
|
||||
|
||||
test:
|
||||
@test/readme-deployment-refresh.sh
|
||||
|
||||
Reference in New Issue
Block a user