From 82a4a51358b78b2c20ad718479f226bd9a7027a0 Mon Sep 17 00:00:00 2001 From: jiri Date: Wed, 10 Jun 2026 13:22:34 +0000 Subject: [PATCH] Upload files to "documents" --- .../05-production-deployment-and-recovery.md | 72 +++++++++++++++++++ documents/16-security.md | 4 ++ documents/17-environment.md | 3 + documents/18-roadmap.md | 3 + documents/19-operational-checklist.md | 6 ++ 5 files changed, 88 insertions(+) create mode 100644 documents/05-production-deployment-and-recovery.md create mode 100644 documents/16-security.md create mode 100644 documents/17-environment.md create mode 100644 documents/18-roadmap.md create mode 100644 documents/19-operational-checklist.md diff --git a/documents/05-production-deployment-and-recovery.md b/documents/05-production-deployment-and-recovery.md new file mode 100644 index 0000000..a5cf69a --- /dev/null +++ b/documents/05-production-deployment-and-recovery.md @@ -0,0 +1,72 @@ +# AppFactory Production Deployment and Recovery Guide + +## Configuration + +Set before deployment: + +```bash +CLEAR_USERS=true +``` + +Options: + +```bash +CLEAR_USERS=true +CLEAR_USERS=false +``` + +- true = delete users table, first Google login becomes admin +- false = preserve users + +## Download + +```bash +mkdir -p ~/Downloads +cd ~/Downloads + +curl -L -o restore-appfactory.sh http://jiri-uhlir.eu/downloads/restore-appfactory.sh +curl -L -o services.tar.gz http://jiri-uhlir.eu/downloads/services.tar.gz + +chmod +x restore-appfactory.sh +``` + +## Restore + +```bash +sudo bash ./restore-appfactory.sh "$PWD/services.tar.gz" root 2>&1 | tee restore.log +``` + +## Optional user cleanup + +```bash +DB="/opt/appfactory/data/appfactory/appfactory.db" + +if [ "$CLEAR_USERS" = "true" ]; then + cp "$DB" "$DB.before-users-clean-$(date +%Y%m%d-%H%M%S)" + sqlite3 "$DB" "delete from users;" +fi +``` + +## Validation + +```bash +/opt/appfactory/workspace/appfactory-tools/maintenance/preflight-check.sh +docker ps --format 'table {{.Names}}\t{{.Status}}' +``` + +Expected: + +APPFACTORY PREFLIGHT: READY + +## Running Applications + +Verify user applications are running: + +```bash +docker ps -a --format 'table {{.Names}}\t{{.Status}}' +``` + +Examples: + +- test-dotnet-api +- microsoft-365-service diff --git a/documents/16-security.md b/documents/16-security.md new file mode 100644 index 0000000..889254f --- /dev/null +++ b/documents/16-security.md @@ -0,0 +1,4 @@ +# Security + +Last admin protection. +Admin-only user management. \ No newline at end of file diff --git a/documents/17-environment.md b/documents/17-environment.md new file mode 100644 index 0000000..c2c4035 --- /dev/null +++ b/documents/17-environment.md @@ -0,0 +1,3 @@ +# Environment Variables + +Production .env values must be preserved during restore. \ No newline at end of file diff --git a/documents/18-roadmap.md b/documents/18-roadmap.md new file mode 100644 index 0000000..26692a3 --- /dev/null +++ b/documents/18-roadmap.md @@ -0,0 +1,3 @@ +# Roadmap + +RBAC, deeper provisioning, monitoring improvements. \ No newline at end of file diff --git a/documents/19-operational-checklist.md b/documents/19-operational-checklist.md new file mode 100644 index 0000000..34b599e --- /dev/null +++ b/documents/19-operational-checklist.md @@ -0,0 +1,6 @@ +# Operational Checklist + +Preflight READY +Core containers running +User applications running +OAuth functional. \ No newline at end of file