Files
appfactory-infrastructure/documents/05-production-deployment-and-recovery.md
T
2026-06-10 13:22:34 +00:00

1.2 KiB

AppFactory Production Deployment and Recovery Guide

Configuration

Set before deployment:

CLEAR_USERS=true

Options:

CLEAR_USERS=true
CLEAR_USERS=false
  • true = delete users table, first Google login becomes admin
  • false = preserve users

Download

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

sudo bash ./restore-appfactory.sh "$PWD/services.tar.gz" root 2>&1 | tee restore.log

Optional user cleanup

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

/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:

docker ps -a --format 'table {{.Names}}\t{{.Status}}'

Examples:

  • test-dotnet-api
  • microsoft-365-service