From ee4fd8f3616e4070c53d962230289c2bb93d51b8 Mon Sep 17 00:00:00 2001 From: harkon Date: Tue, 2 Dec 2025 15:15:38 +0200 Subject: [PATCH] feat: add makefile targets for production management --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Makefile b/Makefile index e0a8eeb..96f1877 100644 --- a/Makefile +++ b/Makefile @@ -233,6 +233,28 @@ deploy-monitoring-prod: ## Deploy monitoring stack (production) @echo "๐Ÿ“Š Deploying production monitoring..." @./infra/scripts/deploy.sh production monitoring +# Production (On-Server) Management +prod-setup: ## Run full production setup (secrets + authentik) + @echo "๐Ÿš€ Setting up production environment..." + @./scripts/setup-prod.sh + +prod-deploy: ## Deploy full production stack + @echo "๐Ÿš€ Deploying production stack..." + @./infra/scripts/deploy.sh production infrastructure + @./infra/scripts/deploy.sh production services + +prod-clean-authentik: ## WIPE Authentik data to reset admin password (DANGER) + @echo "โš ๏ธ WARNING: This will delete all Authentik users and configuration!" + @read -p "Are you sure? (y/N): " confirm && [ "$$confirm" = "y" ] || exit 1 + @echo "๐Ÿ›‘ Stopping Authentik..." + @docker stop apa-authentik-server apa-authentik-worker apa-authentik-outpost apa-authentik-db apa-authentik-redis 2>/dev/null || true + @docker rm apa-authentik-server apa-authentik-worker apa-authentik-outpost apa-authentik-db apa-authentik-redis 2>/dev/null || true + @echo "๐Ÿงน Removing Authentik database volume..." + @docker volume rm infra_apa-authentik-db-data 2>/dev/null || true + @echo "๐Ÿ”„ Restarting Authentik..." + @./infra/scripts/deploy.sh production infrastructure + @echo "โœ… Authentik reset complete. Go to https://auth.app.harkon.co.uk/if/flow/initial-setup/ to set admin password." + # Data management seed: ## Seed the system with initial data @echo "๐ŸŒฑ Seeding system with initial data..."