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:
@@ -11,9 +11,14 @@ BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Configuration
|
||||
# Load environment variables
|
||||
if [ -f "infra/compose/.env" ]; then
|
||||
source "infra/compose/.env"
|
||||
fi
|
||||
|
||||
DOMAIN=${DOMAIN:-local}
|
||||
AUTHENTIK_URL="https://auth.${DOMAIN}"
|
||||
ADMIN_EMAIL="admin@local"
|
||||
ADMIN_EMAIL="admin@${DOMAIN}"
|
||||
ADMIN_PASSWORD="${AUTHENTIK_ADMIN_PASSWORD:-admin123}"
|
||||
ENV_FILE="infra/compose/.env"
|
||||
|
||||
@@ -116,6 +121,12 @@ get_api_token() {
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
# Check if we already have a valid token (not the placeholder)
|
||||
if [ -n "${AUTHENTIK_BOOTSTRAP_TOKEN:-}" ] && [ "$AUTHENTIK_BOOTSTRAP_TOKEN" != "ak-bootstrap-token" ]; then
|
||||
echo -e "${GREEN}✅ Bootstrap token already configured in .env${NC}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if setup is already complete
|
||||
if check_setup_status; then
|
||||
echo -e "${GREEN}✅ Authentik setup is already complete${NC}"
|
||||
@@ -132,15 +143,23 @@ main() {
|
||||
echo -e "${GREEN}🎉 Setup complete! You can now run:${NC}"
|
||||
echo -e " ${BLUE}make setup-authentik${NC} - to import blueprint configuration"
|
||||
else
|
||||
echo -e "${YELLOW}⚠️ Could not get API token automatically${NC}"
|
||||
echo -e "${BLUE}📋 Manual steps:${NC}"
|
||||
echo -e " 1. Open ${BLUE}https://auth.local${NC} and log in"
|
||||
echo -e " 2. Go to Admin Interface > Tokens"
|
||||
echo -e " 3. Create a new token and update AUTHENTIK_BOOTSTRAP_TOKEN in .env"
|
||||
echo -e "${YELLOW}⚠️ Could not get API token automatically.${NC}"
|
||||
echo -e " (This is expected if you changed the admin password during setup)"
|
||||
echo
|
||||
echo -e "${BLUE}📋 ACTION REQUIRED: Manual Configuration${NC}"
|
||||
echo -e " 1. Open ${BLUE}https://auth.${DOMAIN}/if/admin/#/core/tokens${NC} and log in"
|
||||
echo -e " 2. Click 'Create'"
|
||||
echo -e " - Identifier: ${YELLOW}ai-tax-agent-bootstrap${NC}"
|
||||
echo -e " - User: ${YELLOW}akadmin${NC}"
|
||||
echo -e " 3. Copy the ${YELLOW}Key${NC} (it's a long string)"
|
||||
echo -e " 4. Open ${YELLOW}infra/environments/local/.env${NC} in your editor"
|
||||
echo -e " 5. Replace ${YELLOW}AUTHENTIK_BOOTSTRAP_TOKEN=ak-bootstrap-token${NC} with your new token"
|
||||
echo -e " 6. Run ${BLUE}make setup-sso${NC} again"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${YELLOW}📋 Initial setup still required:${NC}"
|
||||
echo -e " 1. Open ${BLUE}https://auth.local/if/flow/initial-setup/${NC}"
|
||||
echo -e " 1. Open ${BLUE}https://auth.${DOMAIN}/if/flow/initial-setup/${NC}"
|
||||
echo -e " 2. Complete the setup wizard with these credentials:"
|
||||
echo -e " • Email: ${BLUE}$ADMIN_EMAIL${NC}"
|
||||
echo -e " • Password: ${BLUE}$ADMIN_PASSWORD${NC}"
|
||||
|
||||
Reference in New Issue
Block a user