Containerize frontend

This commit is contained in:
Joey Yakimowich-Payne 2026-01-15 22:18:56 -07:00
commit cb565b5ac8
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
4 changed files with 74 additions and 36 deletions

View file

@ -133,6 +133,10 @@ cat > .env << EOF
# Kaboot Production Configuration
# Generated by setup-prod.sh on $(date)
# Domain Configuration (used by docker-compose for frontend build)
KABOOT_DOMAIN=${KABOOT_DOMAIN}
AUTH_DOMAIN=${AUTH_DOMAIN}
# Database
PG_PASS=${PG_PASS}
PG_USER=authentik
@ -229,29 +233,12 @@ if [ -f "$DEV_BLUEPRINT" ]; then
print_success "Removed development blueprint"
fi
print_step "Installing frontend dependencies..."
npm install --silent 2>/dev/null || npm install
print_success "Dependencies installed"
print_step "Building frontend with production URLs..."
VITE_API_URL="https://${KABOOT_DOMAIN}" \
VITE_BACKEND_URL="https://${KABOOT_DOMAIN}" \
VITE_AUTHENTIK_URL="https://${AUTH_DOMAIN}" \
VITE_OIDC_CLIENT_ID="kaboot-spa" \
VITE_OIDC_APP_SLUG="kaboot" \
npm run build --silent 2>/dev/null || npm run build
if [ -n "$GEMINI_API_KEY" ]; then
print_success "System AI will be available (key configured for backend)"
else
print_warning "No Gemini API key provided - users must configure their own"
fi
print_success "Frontend built"
echo ""
echo -e "${GREEN}${BOLD}════════════════════════════════════════════════════════════${NC}"
echo -e "${GREEN}${BOLD} Setup Complete!${NC}"
@ -280,7 +267,6 @@ echo "────────────────────────
echo " .env - Environment variables"
echo " Caddyfile - Reverse proxy config"
echo " authentik/blueprints/kaboot-setup-production.yaml"
echo " dist/ - Built frontend"
echo ""
echo -e "${BOLD}Next Steps${NC}"
echo "────────────────────────────────────────────────────────────"