completed local setup with compose
Some checks failed
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 / 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 / Notifications (push) Has been cancelled
Some checks failed
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 / 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 / Notifications (push) Has been cancelled
This commit is contained in:
@@ -112,6 +112,18 @@ echo ""
|
||||
compose_cmd() {
|
||||
local file=$1
|
||||
shift
|
||||
|
||||
# For local environment, use the new unified compose.yaml
|
||||
if [ "$ENVIRONMENT" = "local" ] && [ "$file" = "all" ]; then
|
||||
docker compose -f "$INFRA_DIR/compose/compose.yaml" -f "$INFRA_DIR/compose/compose.override.yaml" --env-file "$ENV_FILE" --project-name "ai-tax-agent" "$@"
|
||||
return
|
||||
fi
|
||||
|
||||
# For other environments or specific stacks, keep existing behavior for now
|
||||
# or adapt as needed. The goal is to eventually unify everything.
|
||||
# If file is 'infrastructure.yaml', etc., we might still want to use base/
|
||||
# directly for production to avoid local overrides.
|
||||
|
||||
docker compose -f "$BASE_DIR/$file" --env-file "$ENV_FILE" --project-name "ai-tax-agent-$ENVIRONMENT" "$@"
|
||||
}
|
||||
|
||||
@@ -139,7 +151,7 @@ deploy_services() {
|
||||
# Deploy external services stack
|
||||
deploy_external() {
|
||||
log_info "Deploying external services stack..."
|
||||
|
||||
|
||||
if [ "$ENVIRONMENT" = "production" ] || [ "$ENVIRONMENT" = "development" ]; then
|
||||
log_warning "External services (Traefik, Authentik, Gitea) may already exist on this server"
|
||||
read -p "Do you want to deploy external services? (y/N) " -n 1 -r
|
||||
@@ -149,7 +161,7 @@ deploy_external() {
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
compose_cmd "external.yaml" up -d "$@"
|
||||
log_success "External services stack deployed"
|
||||
}
|
||||
@@ -157,50 +169,55 @@ deploy_external() {
|
||||
# Stop all stacks
|
||||
stop_all() {
|
||||
log_info "Stopping all stacks..."
|
||||
|
||||
|
||||
if [ -f "$BASE_DIR/services.yaml" ]; then
|
||||
compose_cmd "services.yaml" down
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "$BASE_DIR/monitoring.yaml" ]; then
|
||||
compose_cmd "monitoring.yaml" down
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "$BASE_DIR/infrastructure.yaml" ]; then
|
||||
compose_cmd "infrastructure.yaml" down
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "$BASE_DIR/external.yaml" ]; then
|
||||
log_warning "External services not stopped (may be shared)"
|
||||
fi
|
||||
|
||||
|
||||
log_success "All stacks stopped"
|
||||
}
|
||||
|
||||
# Deploy all stacks
|
||||
deploy_all() {
|
||||
log_info "Deploying all stacks..."
|
||||
|
||||
|
||||
# Check if networks exist
|
||||
if ! docker network inspect apa-frontend >/dev/null 2>&1; then
|
||||
log_warning "Network 'apa-frontend' does not exist. Creating..."
|
||||
docker network create apa-frontend
|
||||
fi
|
||||
|
||||
|
||||
if ! docker network inspect apa-backend >/dev/null 2>&1; then
|
||||
log_warning "Network 'apa-backend' does not exist. Creating..."
|
||||
docker network create apa-backend
|
||||
fi
|
||||
|
||||
|
||||
# Deploy in order
|
||||
deploy_infrastructure "$@"
|
||||
sleep 5
|
||||
|
||||
deploy_monitoring "$@"
|
||||
sleep 5
|
||||
|
||||
deploy_services "$@"
|
||||
|
||||
if [ "$ENVIRONMENT" = "local" ]; then
|
||||
log_info "Deploying unified stack for local environment..."
|
||||
compose_cmd "all" up -d "$@"
|
||||
else
|
||||
deploy_infrastructure "$@"
|
||||
sleep 5
|
||||
|
||||
deploy_monitoring "$@"
|
||||
sleep 5
|
||||
|
||||
deploy_services "$@"
|
||||
fi
|
||||
|
||||
log_success "All stacks deployed successfully!"
|
||||
echo ""
|
||||
log_info "Access your services:"
|
||||
|
||||
Reference in New Issue
Block a user