# Gitea Migration - Detailed Execution Log **Service:** Gitea (Git hosting) **Started:** 2025-11-16T10:30:00Z **Status:** In Progress ## Pre-Migration Checklist - [ ] Dockge WebUI accessible on photon.obnh.io - [ ] Both containers (gitea + gitea_postgres) visible - [ ] Screenshots captured - [ ] Database backup created - [ ] Backup verified and transferred ## Step 1: Pre-Migration Backup ### Actions Required 1. Access photon.obnh.io Dockge WebUI 2. Identify gitea_postgres container 3. Execute pg_dump command 4. Save backup to `/home/olaf/dockge-migration-guide/backups/` 5. Verify backup file integrity ### Commands ```bash # Database dump (to be executed on photon) docker exec gitea_postgres pg_dump -U gitea gitea > gitea_db_backup_$(date +%Y%m%d_%H%M%S).sql # Verify backup ls -lh gitea_db_backup_*.sql ``` ### Evidence - Screenshot: `screenshots/01-photon-dockge-containers.png` - Backup file: `backups/gitea_db_backup_TIMESTAMP.sql` --- ## Step 2: Screenshot Documentation ### Dockge Container View - [ ] Screenshot showing both gitea containers - [ ] Container status visible (running/stopped) - [ ] File: `screenshots/01-photon-dockge-containers.png` --- ## Step 3: Stop Gitea Service ### Procedure 1. Navigate to Dockge WebUI on photon 2. Stop gitea container (application first) 3. Screenshot the stop action 4. Stop gitea_postgres container (database second) 5. Screenshot the stop action 6. Verify both containers stopped ### Evidence - Screenshot: `screenshots/02-stop-gitea-container.png` - Screenshot: `screenshots/03-stop-postgres-container.png` - Screenshot: `screenshots/04-both-containers-stopped.png` --- ## Step 4: Export Docker Compose Configuration ### Actions 1. Open Dockge WebUI on photon 2. Navigate to Gitea stack 3. Copy entire docker-compose.yml content 4. Save to `docker-configs/gitea-compose-photon.yml` 5. Screenshot the configuration view ### Evidence - Config file: `docker-configs/gitea-compose-photon.yml` - Screenshot: `screenshots/05-docker-compose-export.png` --- ## Step 5: Database Transfer ### Actions 1. Transfer database dump to fry.obr.sh 2. Verify file integrity (checksum) 3. Prepare for restore ### Commands ```bash # Transfer to fry scp gitea_db_backup_*.sql root@fry.obr.sh:/tmp/ # Verify on fry ssh root@fry.obr.sh "md5sum /tmp/gitea_db_backup_*.sql" ``` --- ## Step 6: Deploy on Fry ### Procedure 1. Access Dockge WebUI on fry.obr.sh 2. Create new stack named "gitea" 3. Paste docker-compose.yml content 4. Start postgres container first 5. Restore database 6. Start gitea container 7. Screenshot each step ### Database Restore ```bash # Restore database (execute on fry) docker exec -i gitea_postgres psql -U gitea gitea < /tmp/gitea_db_backup_*.sql ``` ### Evidence - Screenshot: `screenshots/06-fry-dockge-new-stack.png` - Screenshot: `screenshots/07-fry-compose-paste.png` - Screenshot: `screenshots/08-fry-postgres-started.png` - Screenshot: `screenshots/09-fry-gitea-started.png` --- ## Step 7: Browser Verification ### Playwright Automation - [ ] Navigate to git.photon.obnh.io (should resolve to fry) - [ ] Verify login page loads - [ ] Test repository browsing - [ ] Screenshot successful access ### Verification Points 1. DNS resolution (should point to 45.131.64.213) 2. HTTPS certificate valid 3. Login page renders 4. Repository list accessible 5. Git operations functional ### Evidence - Screenshot: `screenshots/10-browser-login-page.png` - Screenshot: `screenshots/11-browser-repo-list.png` --- ## Step 8: Final Verification ### Checklist - [ ] Gitea accessible via browser - [ ] All repositories visible - [ ] User authentication working - [ ] Git clone/push operations tested - [ ] DNS routing verified --- ## Post-Migration ### Actions - [ ] Commit all screenshots to git - [ ] Update this document with timestamps - [ ] Tag git commit: `gitea-migration-complete` - [ ] Archive backups ### Rollback Procedure (if needed) 1. Stop containers on fry 2. Restart containers on photon 3. Verify service restoration 4. Document incident --- ## Timeline | Step | Started | Completed | Duration | Status | |------|---------|-----------|----------|--------| | Pre-Migration Backup | | | | Pending | | Screenshot Documentation | | | | Pending | | Stop Gitea Service | | | | Pending | | Export Configuration | | | | Pending | | Database Transfer | | | | Pending | | Deploy on Fry | | | | Pending | | Browser Verification | | | | Pending | | Git Commit | | | | Pending | --- ## Notes *This document will be updated in real-time as the migration progresses.*