clean up base infra
Some checks failed
CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
CI/CD Pipeline / Policy Validation (push) Has been cancelled
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-firm-connectors) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-forms) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-hmrc) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ingestion) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-normalize-map) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ocr) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-indexer) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-reason) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rpa) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (ui-review) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (ui-review) (push) Has been cancelled
CI/CD Pipeline / Generate SBOM (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Notifications (push) Has been cancelled
Some checks failed
CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
CI/CD Pipeline / Policy Validation (push) Has been cancelled
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-firm-connectors) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-forms) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-hmrc) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ingestion) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-normalize-map) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ocr) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-indexer) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-reason) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rpa) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (ui-review) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (ui-review) (push) Has been cancelled
CI/CD Pipeline / Generate SBOM (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Notifications (push) Has been cancelled
This commit is contained in:
42
Makefile
42
Makefile
@@ -69,7 +69,7 @@ networks-clean: ## Remove external Docker networks
|
||||
# Development lifecycle
|
||||
run: ## Start all services in development mode
|
||||
@echo "🏃 Starting AI Tax Agent System..."
|
||||
@./scripts/deploy-with-fixes.sh
|
||||
@./scripts/deploy.sh
|
||||
|
||||
run-simple: ## Start all services without fixes (original behavior)
|
||||
@echo "🏃 Starting AI Tax Agent System (simple)..."
|
||||
@@ -116,11 +116,11 @@ build-service: ## Build specific service (usage: make build-service SERVICE=svc-
|
||||
deploy-infra: networks ## Deploy only infrastructure services
|
||||
@echo "🏗️ Deploying infrastructure services..."
|
||||
@./scripts/generate-dev-certs.sh
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d traefik postgres redis authentik-db authentik-redis
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-traefik ata-postgres ata-redis ata-authentik-db ata-authentik-redis
|
||||
@echo "⏳ Waiting for databases..."
|
||||
@sleep 15
|
||||
@make fix-databases
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d authentik-server authentik-worker authentik-outpost vault neo4j qdrant minio prometheus grafana loki
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-authentik-server ata-authentik-worker ata-authentik-outpost ata-vault ata-neo4j ata-qdrant ata-minio ata-prometheus ata-grafana ata-loki
|
||||
@echo "✅ Infrastructure deployment complete"
|
||||
@echo "⏳ Waiting for services to be ready..."
|
||||
@sleep 30
|
||||
@@ -128,7 +128,7 @@ deploy-infra: networks ## Deploy only infrastructure services
|
||||
|
||||
deploy-services: ## Deploy only application services
|
||||
@echo "🚀 Deploying application services..."
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d svc-ingestion svc-extract svc-forms svc-hmrc svc-kg svc-normalize-map svc-ocr svc-rag-indexer svc-rag-retriever svc-reason svc-rpa svc-firm-connectors ui-review unleash
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-svc-ingestion ata-svc-extract ata-svc-forms ata-svc-hmrc ata-svc-kg ata-svc-normalize-map ata-svc-ocr ata-svc-rag-indexer ata-svc-rag-retriever ata-svc-reason ata-svc-rpa ata-svc-firm-connectors ata-ui-review ata-unleash
|
||||
@echo "✅ Services deployment complete"
|
||||
|
||||
# Development tools
|
||||
@@ -236,7 +236,7 @@ deploy-monitoring-prod: ## Deploy monitoring stack (production)
|
||||
seed: ## Seed the system with initial data
|
||||
@echo "🌱 Seeding system with initial data..."
|
||||
@echo "📊 Creating Neo4j constraints and indexes..."
|
||||
@docker exec neo4j cypher-shell -u neo4j -p $(NEO4J_PASSWORD) -f /var/lib/neo4j/import/schema.cypher 2>/dev/null || echo "Neo4j not ready"
|
||||
@docker exec ata-neo4j cypher-shell -u neo4j -p $(NEO4J_PASSWORD) -f /var/lib/neo4j/import/schema.cypher 2>/dev/null || echo "Neo4j not ready"
|
||||
@echo "🗂️ Creating Qdrant collections..."
|
||||
@curl -X PUT "http://localhost:6333/collections/documents" -H "Content-Type: application/json" -d '{"vectors": {"size": 1536, "distance": "Cosine"}}' 2>/dev/null || echo "Qdrant not ready"
|
||||
@echo "✅ Seeding complete"
|
||||
@@ -264,12 +264,12 @@ status: ## Show status of all services
|
||||
health: ## Check health of all services
|
||||
@echo "🏥 Health Check:"
|
||||
@echo "🔗 Traefik: $$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/ping || echo 'DOWN')"
|
||||
@echo "🗄️ PostgreSQL: $$(docker exec postgres pg_isready -U postgres 2>/dev/null && echo 'UP' || echo 'DOWN')"
|
||||
@echo "🗄️ PostgreSQL: $$(docker exec ata-postgres pg_isready -U postgres 2>/dev/null && echo 'UP' || echo 'DOWN')"
|
||||
@echo "📊 Neo4j: $$(curl -s -o /dev/null -w '%{http_code}' http://localhost:7474 || echo 'DOWN')"
|
||||
@echo "🔍 Qdrant: $$(curl -s -o /dev/null -w '%{http_code}' http://localhost:6333/health || echo 'DOWN')"
|
||||
@echo "📦 MinIO: $$(curl -s -o /dev/null -w '%{http_code}' http://localhost:9000/minio/health/live || echo 'DOWN')"
|
||||
@echo "🔐 Vault: $$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8200/v1/sys/health || echo 'DOWN')"
|
||||
@echo "🏃 Redis: $$(docker exec redis redis-cli ping 2>/dev/null || echo 'DOWN')"
|
||||
@echo "🏃 Redis: $$(docker exec ata-redis redis-cli ping 2>/dev/null || echo 'DOWN')"
|
||||
@echo "🔐 Authentik: $$(curl -s -k -o /dev/null -w '%{http_code}' https://auth.local || echo 'DOWN')"
|
||||
|
||||
verify: ## Run comprehensive infrastructure verification
|
||||
@@ -282,18 +282,18 @@ troubleshoot: ## Run comprehensive troubleshooting and fixes
|
||||
|
||||
restart-authentik: ## Restart Authentik components in correct order
|
||||
@echo "🔄 Restarting Authentik components..."
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml stop authentik-server authentik-worker authentik-outpost
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml stop ata-authentik-server ata-authentik-worker ata-authentik-outpost
|
||||
@make fix-databases
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d authentik-server
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-authentik-server
|
||||
@sleep 15
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d authentik-worker authentik-outpost
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-authentik-worker ata-authentik-outpost
|
||||
@echo "✅ Authentik restart complete"
|
||||
|
||||
restart-unleash: ## Restart Unleash with database fixes
|
||||
@echo "🔄 Restarting Unleash..."
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml stop unleash
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml stop ata-unleash
|
||||
@make fix-databases
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d unleash
|
||||
@cd infra/compose && docker compose -f docker-compose.local.yml up -d ata-unleash
|
||||
@echo "✅ Unleash restart complete"
|
||||
|
||||
# Cleanup
|
||||
@@ -320,13 +320,13 @@ shell: ## Open shell in specific service (usage: make shell SERVICE=svc-extract)
|
||||
@docker exec -it $(SERVICE) /bin/bash
|
||||
|
||||
db-shell: ## Open PostgreSQL shell
|
||||
@docker exec -it postgres psql -U postgres -d tax_system
|
||||
@docker exec -it ata-postgres psql -U postgres -d tax_system
|
||||
|
||||
neo4j-shell: ## Open Neo4j shell
|
||||
@docker exec -it neo4j cypher-shell -u neo4j -p $(NEO4J_PASSWORD)
|
||||
@docker exec -it ata-neo4j cypher-shell -u neo4j -p $(NEO4J_PASSWORD)
|
||||
|
||||
redis-shell: ## Open Redis shell
|
||||
@docker exec -it redis redis-cli
|
||||
@docker exec -it ata-redis redis-cli
|
||||
|
||||
# Documentation
|
||||
docs: ## Generate documentation
|
||||
@@ -361,9 +361,9 @@ load-test: ## Run load tests
|
||||
backup: ## Create backup of all data
|
||||
@echo "💾 Creating backup..."
|
||||
@mkdir -p backups/$$(date +%Y%m%d_%H%M%S)
|
||||
@docker exec postgres pg_dump -U postgres tax_system > backups/$$(date +%Y%m%d_%H%M%S)/postgres.sql
|
||||
@docker exec neo4j neo4j-admin dump --database=neo4j --to=/tmp/neo4j.dump
|
||||
@docker cp neo4j:/tmp/neo4j.dump backups/$$(date +%Y%m%d_%H%M%S)/
|
||||
@docker exec ata-postgres pg_dump -U postgres tax_system > backups/$$(date +%Y%m%d_%H%M%S)/postgres.sql
|
||||
@docker exec ata-neo4j neo4j-admin dump --database=neo4j --to=/tmp/neo4j.dump
|
||||
@docker cp ata-neo4j:/tmp/neo4j.dump backups/$$(date +%Y%m%d_%H%M%S)/
|
||||
@echo "✅ Backup created in backups/ directory"
|
||||
|
||||
restore: ## Restore from backup (usage: make restore BACKUP=20240101_120000)
|
||||
@@ -374,9 +374,9 @@ restore: ## Restore from backup (usage: make restore BACKUP=20240101_120000)
|
||||
@echo "📥 Restoring from backup $(BACKUP)..."
|
||||
@echo "⚠️ This will overwrite existing data!"
|
||||
@read -p "Are you sure? (y/N): " confirm && [ "$$confirm" = "y" ] || exit 1
|
||||
@docker exec -i postgres psql -U postgres -d tax_system < backups/$(BACKUP)/postgres.sql
|
||||
@docker cp backups/$(BACKUP)/neo4j.dump neo4j:/tmp/
|
||||
@docker exec neo4j neo4j-admin load --database=neo4j --from=/tmp/neo4j.dump --force
|
||||
@docker exec -i ata-postgres psql -U postgres -d tax_system < backups/$(BACKUP)/postgres.sql
|
||||
@docker cp backups/$(BACKUP)/neo4j.dump ata-neo4j:/tmp/
|
||||
@docker exec ata-neo4j neo4j-admin load --database=neo4j --from=/tmp/neo4j.dump --force
|
||||
@echo "✅ Restore complete"
|
||||
|
||||
# Environment variables
|
||||
|
||||
Reference in New Issue
Block a user