Compare commits
2 Commits
main
..
a974ab7da8
| Author | SHA1 | Date | |
|---|---|---|---|
| a974ab7da8 | |||
| 6bbbb65238 |
@@ -1,74 +0,0 @@
|
|||||||
# Migration Status Tracker
|
|
||||||
|
|
||||||
**Last Updated:** 2025-11-16 10:30 UTC
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
| Service | Status | Started | Completed | Notes |
|
|
||||||
|---------|--------|---------|-----------|-------|
|
|
||||||
| Traefik | ⏳ Pending | - | - | CRITICAL: Must complete first |
|
|
||||||
| photon-default-page | ⏳ Pending | - | - | Waiting for Traefik |
|
|
||||||
| Gitea | ⏳ Pending | - | - | Includes PostgreSQL database |
|
|
||||||
| Mastodon (bern.social) | ⏳ Pending | - | - | 5 containers, most complex |
|
|
||||||
|
|
||||||
## Status Legend
|
|
||||||
- ⏳ **Pending** - Not started
|
|
||||||
- 🔄 **In Progress** - Currently migrating
|
|
||||||
- ✅ **Completed** - Successfully migrated and verified
|
|
||||||
- ⚠️ **Issues** - Problems encountered
|
|
||||||
- ❌ **Failed** - Migration failed, needs intervention
|
|
||||||
|
|
||||||
## Current Phase
|
|
||||||
|
|
||||||
**Phase:** Repository setup and initial planning
|
|
||||||
**Current Task:** Creating documentation structure
|
|
||||||
**Next Task:** Initialize Dockge WebUI on both servers
|
|
||||||
|
|
||||||
## Pre-Migration Checks
|
|
||||||
|
|
||||||
- [x] Git repository created on git.proton.obr.sh
|
|
||||||
- [x] Documentation structure initialized
|
|
||||||
- [ ] Dockge WebUI configured on photon.obnh.io
|
|
||||||
- [ ] Dockge WebUI configured on fry.obr.sh
|
|
||||||
- [ ] Screenshot tooling verified
|
|
||||||
- [ ] OpenRouter.AI image analysis tested
|
|
||||||
- [ ] Browser verification tools tested
|
|
||||||
|
|
||||||
## Server Status
|
|
||||||
|
|
||||||
### Source: photon.obnh.io (95.217.133.54)
|
|
||||||
**Running Services:**
|
|
||||||
- Dockge (port 5001) - ⚠️ Needs initial setup
|
|
||||||
- Traefik - ✅ Running
|
|
||||||
- Mastodon (5 containers) - ✅ Running
|
|
||||||
- Gitea + PostgreSQL - ✅ Running
|
|
||||||
- photon-default-page - ✅ Running
|
|
||||||
|
|
||||||
### Target: fry.obr.sh (45.131.64.213)
|
|
||||||
**Running Services:**
|
|
||||||
- Dockge (port 5001) - ⚠️ Needs initial setup
|
|
||||||
- Traefik - ✅ Running (already deployed)
|
|
||||||
- test-whoami - ✅ Running (test service)
|
|
||||||
|
|
||||||
## Migration Timeline
|
|
||||||
|
|
||||||
| Date | Event |
|
|
||||||
|------|-------|
|
|
||||||
| 2025-11-16 10:30 | Repository created |
|
|
||||||
| 2025-11-16 10:30 | Documentation structure initialized |
|
|
||||||
|
|
||||||
## Blockers & Issues
|
|
||||||
|
|
||||||
None currently.
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- Traefik is already partially deployed on fry.obr.sh
|
|
||||||
- Both Dockge instances require initial setup before WebUI can be used
|
|
||||||
- All compose files located in /opt/ on photon.obnh.io
|
|
||||||
- Backup system already in place (restic to Hetzner)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Migration Coordinator:** AI-orchestrated multi-agent system
|
|
||||||
**Documentation:** Auto-generated with screenshot annotations
|
|
||||||
@@ -1,115 +1,62 @@
|
|||||||
# Dockge Migration Guide
|
# Dockge Migration Guide
|
||||||
|
|
||||||
Complete step-by-step guide for migrating all services from **photon.obnh.io** to **fry.obr.sh** using Dockge WebUI with comprehensive screenshot documentation.
|
Complete documentation for migrating services from photon.obnh.io to fry.obr.sh using Dockge WebUI.
|
||||||
|
|
||||||
## Migration Overview
|
## Project Overview
|
||||||
|
|
||||||
**Source Server:** photon.obnh.io (95.217.133.54)
|
This repository contains comprehensive migration documentation, scripts, and verification records for moving containerized services between servers.
|
||||||
|
|
||||||
|
**Source Server:** photon.obnh.io
|
||||||
**Target Server:** fry.obr.sh (45.131.64.213)
|
**Target Server:** fry.obr.sh (45.131.64.213)
|
||||||
**Method:** Docker Compose migration with Dockge WebUI management
|
**Management Tool:** Dockge WebUI
|
||||||
**Documentation:** AI-annotated screenshots at every step
|
**Migration Date:** 2025-11-16
|
||||||
|
|
||||||
## Services to Migrate
|
## Services to Migrate
|
||||||
|
|
||||||
Migration follows strict dependency order:
|
1. **Gitea** - Git hosting service with PostgreSQL database
|
||||||
|
2. Additional services (TBD)
|
||||||
1. **[Traefik](docs/01-traefik-migration.md)** - CRITICAL FIRST (reverse proxy)
|
|
||||||
2. **[photon-default-page](docs/02-photon-default-page-migration.md)** - Simple test service
|
|
||||||
3. **[Gitea](docs/03-gitea-migration.md)** - Git hosting + PostgreSQL database
|
|
||||||
4. **[Mastodon (bern.social)](docs/04-mastodon-migration.md)** - Complex (5 containers)
|
|
||||||
|
|
||||||
## Repository Structure
|
## Repository Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
/
|
/
|
||||||
├── README.md # This file
|
├── docs/ # Migration documentation
|
||||||
├── docs/ # Step-by-step migration guides
|
│ ├── 01-overview.md # Migration overview and planning
|
||||||
│ ├── 01-traefik-migration.md
|
│ ├── 02-gitea-migration.md # Gitea-specific migration steps
|
||||||
│ ├── 02-photon-default-page-migration.md
|
│ └── templates/ # Document templates
|
||||||
│ ├── 03-gitea-migration.md
|
├── screenshots/ # Verification screenshots
|
||||||
│ ├── 04-mastodon-migration.md
|
├── docker-configs/ # Exported docker-compose.yml files
|
||||||
│ └── 99-troubleshooting.md
|
├── backups/ # Database dumps and backups
|
||||||
├── screenshots/ # All screenshots
|
└── scripts/ # Migration automation scripts
|
||||||
│ ├── original/ # Original unmodified screenshots
|
|
||||||
│ └── annotated/ # AI-annotated with markup
|
|
||||||
├── compose-files/ # Docker compose configurations
|
|
||||||
├── verification/ # Browser verification results
|
|
||||||
└── MIGRATION_STATUS.md # Current migration progress
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Migration Methodology
|
## Migration Workflow
|
||||||
|
|
||||||
### Pre-Migration Checklist
|
1. **Pre-Migration**
|
||||||
- [ ] Backup all data on source server
|
- Service inventory and dependency mapping
|
||||||
- [ ] Verify DNS records
|
- Backup all data (databases, volumes, configs)
|
||||||
- [ ] Test SSH access to both servers
|
- Screenshot current state in Dockge
|
||||||
- [ ] Verify Dockge running on both servers
|
|
||||||
- [ ] Document current service status
|
|
||||||
|
|
||||||
### Migration Steps (Per Service)
|
2. **Migration**
|
||||||
1. **Screenshot & Document** - Capture current state in Dockge WebUI
|
- Stop services on source server
|
||||||
2. **Stop Service** - Gracefully stop on source server
|
- Export docker-compose configurations
|
||||||
3. **Export Configuration** - Copy docker-compose.yml and environment
|
- Transfer data to target server
|
||||||
4. **Transfer Data** - Migrate volumes, databases, persistent data
|
- Deploy on target server
|
||||||
5. **Deploy on Target** - Apply configuration on fry.obr.sh
|
|
||||||
6. **Verify Running** - Check service health in Dockge
|
|
||||||
7. **Browser Verification** - Test via automated browser checks
|
|
||||||
8. **Update DNS** - Point domain to new server (when ready)
|
|
||||||
|
|
||||||
### Screenshot Documentation
|
3. **Post-Migration**
|
||||||
- **Tool:** Playwright browser automation
|
- Verify service functionality via browser
|
||||||
- **AI Analysis:** google/gemini-2.5-flash-image via openrouter.ai
|
- DNS/routing verification
|
||||||
- **Annotations:** Arrows, circles, labels showing exact actions
|
- Documentation and commit to git
|
||||||
- **Storage:** Both original and annotated versions in git
|
|
||||||
|
|
||||||
### Verification Requirements
|
## Documentation Standards
|
||||||
Each migrated service must pass:
|
|
||||||
- HTTP 200 OK response
|
|
||||||
- Correct response headers (fry.obr.sh IP: 45.131.64.213)
|
|
||||||
- Service-specific health checks
|
|
||||||
- Browser screenshot proof
|
|
||||||
|
|
||||||
## Current Status
|
- All timestamps in ISO 8601 format
|
||||||
|
- Screenshots required for all WebUI operations
|
||||||
|
- Browser verification via Playwright automation
|
||||||
|
- Git commits after each major step
|
||||||
|
|
||||||
See [MIGRATION_STATUS.md](MIGRATION_STATUS.md) for real-time progress tracking.
|
## Author
|
||||||
|
|
||||||
## Tools & Technologies
|
Orchestrated by: @agent-zen-orchestrator
|
||||||
|
Executed by: Specialized sub-agents
|
||||||
- **Dockge:** WebUI for Docker Compose management (port 5001)
|
Date: 2025-11-16
|
||||||
- **Docker Compose:** Container orchestration
|
|
||||||
- **Traefik:** Reverse proxy and SSL termination
|
|
||||||
- **Playwright:** Browser automation for verification
|
|
||||||
- **OpenRouter.AI:** Image analysis with Gemini 2.5 Flash
|
|
||||||
- **Gitea:** Documentation repository hosting
|
|
||||||
|
|
||||||
## Important Notes
|
|
||||||
|
|
||||||
⚠️ **Migration Order is Critical**
|
|
||||||
Traefik MUST be migrated first as it provides reverse proxy for all other services.
|
|
||||||
|
|
||||||
⚠️ **Downtime Expectations**
|
|
||||||
Each service will have brief downtime during migration. Plan accordingly.
|
|
||||||
|
|
||||||
⚠️ **DNS Propagation**
|
|
||||||
DNS changes can take 5-60 minutes to propagate globally.
|
|
||||||
|
|
||||||
⚠️ **Backup First**
|
|
||||||
All services have been backed up before migration begins.
|
|
||||||
|
|
||||||
## Support & Troubleshooting
|
|
||||||
|
|
||||||
See [docs/99-troubleshooting.md](docs/99-troubleshooting.md) for common issues and solutions.
|
|
||||||
|
|
||||||
## Generated Documentation
|
|
||||||
|
|
||||||
This guide was created using AI-assisted migration orchestration with:
|
|
||||||
- Multi-agent coordination for complex tasks
|
|
||||||
- Automated screenshot capture and analysis
|
|
||||||
- Browser-based verification
|
|
||||||
- Real-time documentation generation
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Migration Start Date:** 2025-11-16
|
|
||||||
**Estimated Completion:** TBD
|
|
||||||
**Repository:** https://git.proton.obr.sh/olaf/dockge-migration-guide
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,75 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
networks:
|
|
||||||
traefik-public:
|
|
||||||
external: true
|
|
||||||
internal:
|
|
||||||
external: false
|
|
||||||
|
|
||||||
services:
|
|
||||||
traefik:
|
|
||||||
image: traefik-exoscale:v3.4
|
|
||||||
container_name: traefik
|
|
||||||
restart: unless-stopped
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
networks:
|
|
||||||
- traefik-public
|
|
||||||
- internal
|
|
||||||
dns:
|
|
||||||
- 1.1.1.1
|
|
||||||
- 8.8.8.8
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
environment:
|
|
||||||
- EXOSCALE_API_KEY=${EXOSCALE_API_KEY}
|
|
||||||
- EXOSCALE_API_SECRET=${EXOSCALE_API_SECRET}
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
- ./config/traefik.yml:/traefik.yml:ro
|
|
||||||
- ./config/dynamic:/dynamic:ro
|
|
||||||
- ./certificates:/certificates
|
|
||||||
- ./logs:/logs
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=false"
|
|
||||||
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
|
|
||||||
- "traefik.http.routers.http-catchall.entrypoints=web"
|
|
||||||
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
|
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.customFrameOptionsValue=SAMEORIGIN"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.contentTypeNosniff=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.browserXssFilter=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.referrerPolicy=strict-origin-when-cross-origin"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsSeconds=31536000"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsIncludeSubdomains=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsPreload=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.contentSecurityPolicy=default-src 'self'"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.maxRequestBodyBytes=5368709120"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.memRequestBodyBytes=134217728"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.maxResponseBodyBytes=5368709120"
|
|
||||||
command:
|
|
||||||
- "--providers.docker=true"
|
|
||||||
- "--providers.docker.exposedbydefault=false"
|
|
||||||
- "--providers.docker.network=traefik-public"
|
|
||||||
- "--providers.file.directory=/dynamic"
|
|
||||||
- "--providers.file.watch=true"
|
|
||||||
- "--entrypoints.web.address=:80"
|
|
||||||
- "--entrypoints.websecure.address=:443"
|
|
||||||
- "--api.dashboard=true"
|
|
||||||
- "--api.debug=false"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.email=${ACME_EMAIL}"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.storage=/certificates/acme.json"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge=true"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.provider=exoscale"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.resolvers=1.1.1.1:53,8.8.8.8:53"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.delaybeforecheck=30"
|
|
||||||
- "--log.level=INFO"
|
|
||||||
- "--log.filepath=/logs/traefik.log"
|
|
||||||
- "--accesslog=true"
|
|
||||||
- "--accesslog.filepath=/logs/access.log"
|
|
||||||
- "--ping=true"
|
|
||||||
- "--ping.entrypoint=web"
|
|
||||||
- "--metrics.prometheus=true"
|
|
||||||
- "--metrics.prometheus.entrypoint=web"
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
traefik-public:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
|
||||||
photon-default:
|
|
||||||
image: nginx:alpine
|
|
||||||
container_name: photon-default-page
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
- traefik-public
|
|
||||||
volumes:
|
|
||||||
- ./html:/usr/share/nginx/html:ro
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.docker.network=traefik-public"
|
|
||||||
- "traefik.http.routers.photon-default.rule=Host(`photon.obnh.io`)"
|
|
||||||
- "traefik.http.routers.photon-default.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.photon-default.tls=true"
|
|
||||||
- "traefik.http.routers.photon-default.tls.certresolver=exoscale"
|
|
||||||
- "traefik.http.routers.photon-default.tls.domains[0].main=photon.obnh.io"
|
|
||||||
- "traefik.http.routers.photon-default.service=photon-default"
|
|
||||||
- "traefik.http.routers.photon-default.priority=10"
|
|
||||||
- "traefik.http.services.photon-default.loadbalancer.server.port=80"
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
networks:
|
|
||||||
traefik-public:
|
|
||||||
external: true
|
|
||||||
internal:
|
|
||||||
external: false
|
|
||||||
|
|
||||||
services:
|
|
||||||
traefik:
|
|
||||||
image: traefik-exoscale:v3.4
|
|
||||||
container_name: traefik
|
|
||||||
restart: unless-stopped
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
networks:
|
|
||||||
- traefik-public
|
|
||||||
- internal
|
|
||||||
dns:
|
|
||||||
- 1.1.1.1
|
|
||||||
- 8.8.8.8
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
environment:
|
|
||||||
- EXOSCALE_API_KEY=${EXOSCALE_API_KEY}
|
|
||||||
- EXOSCALE_API_SECRET=${EXOSCALE_API_SECRET}
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
- ./config/traefik.yml:/traefik.yml:ro
|
|
||||||
- ./config/dynamic:/dynamic:ro
|
|
||||||
- ./certificates:/certificates
|
|
||||||
- ./logs:/logs
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=false"
|
|
||||||
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
|
|
||||||
- "traefik.http.routers.http-catchall.entrypoints=web"
|
|
||||||
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
|
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.customFrameOptionsValue=SAMEORIGIN"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.contentTypeNosniff=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.browserXssFilter=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.referrerPolicy=strict-origin-when-cross-origin"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsSeconds=31536000"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsIncludeSubdomains=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.stsPreload=true"
|
|
||||||
- "traefik.http.middlewares.security-headers.headers.contentSecurityPolicy=default-src 'self'"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.maxRequestBodyBytes=5368709120"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.memRequestBodyBytes=134217728"
|
|
||||||
- "traefik.http.middlewares.large-uploads.buffering.maxResponseBodyBytes=5368709120"
|
|
||||||
command:
|
|
||||||
- "--providers.docker=true"
|
|
||||||
- "--providers.docker.exposedbydefault=false"
|
|
||||||
- "--providers.docker.network=traefik-public"
|
|
||||||
- "--providers.file.directory=/dynamic"
|
|
||||||
- "--providers.file.watch=true"
|
|
||||||
- "--entrypoints.web.address=:80"
|
|
||||||
- "--entrypoints.websecure.address=:443"
|
|
||||||
- "--api.dashboard=true"
|
|
||||||
- "--api.debug=false"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.email=${ACME_EMAIL}"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.storage=/certificates/acme.json"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge=true"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.provider=exoscale"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.resolvers=1.1.1.1:53,8.8.8.8:53"
|
|
||||||
- "--certificatesresolvers.exoscale.acme.dnschallenge.delaybeforecheck=30"
|
|
||||||
- "--log.level=INFO"
|
|
||||||
- "--log.filepath=/logs/traefik.log"
|
|
||||||
- "--accesslog=true"
|
|
||||||
- "--accesslog.filepath=/logs/access.log"
|
|
||||||
- "--ping=true"
|
|
||||||
- "--ping.entrypoint=web"
|
|
||||||
- "--metrics.prometheus=true"
|
|
||||||
- "--metrics.prometheus.entrypoint=web"
|
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
gitea:
|
||||||
|
traefik-public:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
gitea:
|
||||||
|
driver: local
|
||||||
|
postgres:
|
||||||
|
driver: local
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:15-alpine
|
||||||
|
container_name: gitea_postgres
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:5432:5432"
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=gitea
|
||||||
|
- POSTGRES_PASSWORD=gitea_db_password_change_me
|
||||||
|
- POSTGRES_DB=gitea
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
volumes:
|
||||||
|
- postgres:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U gitea"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
gitea:
|
||||||
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
dns:
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
- GITEA__database__DB_TYPE=postgres
|
||||||
|
- GITEA__database__HOST=postgres:5432
|
||||||
|
- GITEA__database__NAME=gitea
|
||||||
|
- GITEA__database__USER=gitea
|
||||||
|
- GITEA__database__PASSWD=gitea_db_password_change_me
|
||||||
|
- GITEA__server__ROOT_URL=https://git.photon.obnh.io
|
||||||
|
- GITEA__server__HTTP_PORT=3000
|
||||||
|
- GITEA__server__DOMAIN=git.photon.obnh.io
|
||||||
|
- GITEA__server__ALLOWED_HOST_LIST=git.photon.obnh.io,photon.obnh.io,localhost,127.0.0.1
|
||||||
|
- GITEA__security__SECRET_KEY=your_secret_key_here
|
||||||
|
- GITEA__security__INTERNAL_TOKEN=your_internal_token_here
|
||||||
|
- GITEA__security__TRUST_PROXY_HEADERS=true
|
||||||
|
- GITEA__server__LFS_START_SERVER=true
|
||||||
|
- GITEA__server__LFS_JWT_SECRET=your_lfs_secret_here
|
||||||
|
- GITEA__repository__MAX_FILE_SIZE=5000
|
||||||
|
- GITEA__repository.upload__FILE_MAX_SIZE=5000
|
||||||
|
- GITEA__web__MAX_DISPLAY_FILE_SIZE=52428800
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
- traefik-public
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:172.20.0.1"
|
||||||
|
volumes:
|
||||||
|
- gitea:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
expose:
|
||||||
|
- "3000"
|
||||||
|
- "22"
|
||||||
|
ports:
|
||||||
|
- "222:22"
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=traefik-public"
|
||||||
|
- "traefik.http.routers.gitea.rule=Host(`git.photon.obnh.io`)"
|
||||||
|
- "traefik.http.routers.gitea.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.gitea.tls=true"
|
||||||
|
- "traefik.http.routers.gitea.tls.certresolver=exoscale"
|
||||||
|
- "traefik.http.routers.gitea.tls.domains[0].main=git.photon.obnh.io"
|
||||||
|
- "traefik.http.routers.gitea.service=gitea"
|
||||||
|
- "traefik.http.routers.gitea.priority=100"
|
||||||
|
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# Migration Overview
|
||||||
|
|
||||||
|
**Document Version:** 1.0
|
||||||
|
**Created:** 2025-11-16T10:30:00Z
|
||||||
|
**Last Updated:** 2025-11-16T10:30:00Z
|
||||||
|
|
||||||
|
## Objective
|
||||||
|
|
||||||
|
Migrate Gitea service from photon.obnh.io to fry.obr.sh with zero data loss and minimal downtime.
|
||||||
|
|
||||||
|
## Infrastructure Details
|
||||||
|
|
||||||
|
### Source Server: photon.obnh.io
|
||||||
|
- **Role:** Legacy container host
|
||||||
|
- **Management:** Dockge WebUI
|
||||||
|
- **Services:** Gitea (gitea + gitea_postgres containers)
|
||||||
|
|
||||||
|
### Target Server: fry.obr.sh
|
||||||
|
- **IP:** 45.131.64.213
|
||||||
|
- **Role:** New container host
|
||||||
|
- **Management:** Dockge WebUI
|
||||||
|
- **Status:** Ready for deployment
|
||||||
|
|
||||||
|
## Critical Components
|
||||||
|
|
||||||
|
### Gitea Service
|
||||||
|
- **Container 1:** gitea (application)
|
||||||
|
- **Container 2:** gitea_postgres (database)
|
||||||
|
- **Database:** PostgreSQL with critical repository data
|
||||||
|
- **Volumes:** Git repository data, configs, database files
|
||||||
|
|
||||||
|
## Migration Strategy
|
||||||
|
|
||||||
|
1. **Backup-First Approach**
|
||||||
|
- Full PostgreSQL dump before any changes
|
||||||
|
- Volume snapshots where applicable
|
||||||
|
- Verify backup integrity
|
||||||
|
|
||||||
|
2. **Graceful Shutdown**
|
||||||
|
- Stop application container first
|
||||||
|
- Stop database container second
|
||||||
|
- Verify all processes stopped
|
||||||
|
|
||||||
|
3. **Data Transfer**
|
||||||
|
- Secure transfer of database dumps
|
||||||
|
- Transfer docker-compose configuration
|
||||||
|
- Preserve volume data
|
||||||
|
|
||||||
|
4. **Staged Deployment**
|
||||||
|
- Deploy database container first
|
||||||
|
- Restore database from dump
|
||||||
|
- Deploy application container
|
||||||
|
- Verify connectivity
|
||||||
|
|
||||||
|
5. **Verification**
|
||||||
|
- Browser-based functional testing
|
||||||
|
- DNS resolution verification
|
||||||
|
- Repository access testing
|
||||||
|
|
||||||
|
## Risk Mitigation
|
||||||
|
|
||||||
|
- **Database Corruption:** Full pg_dump before migration
|
||||||
|
- **Network Issues:** Local backups retained on source
|
||||||
|
- **Configuration Drift:** Exact docker-compose.yml export
|
||||||
|
- **Service Downtime:** Documented rollback procedure
|
||||||
|
|
||||||
|
## Success Criteria
|
||||||
|
|
||||||
|
- [ ] Gitea accessible via browser on fry.obr.sh
|
||||||
|
- [ ] All repositories intact and browsable
|
||||||
|
- [ ] User authentication functional
|
||||||
|
- [ ] Database queries responding correctly
|
||||||
|
- [ ] DNS routing verified (if applicable)
|
||||||
|
- [ ] All documentation committed to git
|
||||||
|
|
||||||
|
## Timeline
|
||||||
|
|
||||||
|
- **Preparation:** 30 minutes
|
||||||
|
- **Backup:** 15 minutes
|
||||||
|
- **Migration:** 45 minutes
|
||||||
|
- **Verification:** 30 minutes
|
||||||
|
- **Total:** ~2 hours
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
Proceed to [02-gitea-migration.md](./02-gitea-migration.md) for detailed execution steps.
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
# 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.*
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
# photon-default-page Migration
|
|
||||||
|
|
||||||
**Service:** photon-default-page (nginx static site)
|
|
||||||
**Complexity:** Low
|
|
||||||
**Duration:** 24 seconds
|
|
||||||
**Status:** ✅ Complete
|
|
||||||
**Date:** 2025-11-16 10:36 UTC
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
Simple nginx container serving static HTML for photon.obnh.io default page. Single container with no database dependencies.
|
|
||||||
|
|
||||||
## Pre-Migration State
|
|
||||||
|
|
||||||
**Source (photon.obnh.io):**
|
|
||||||
- Container: `photon-default-page`
|
|
||||||
- Image: `nginx:alpine`
|
|
||||||
- Network: `traefik-public`
|
|
||||||
- Volumes: `./html:/usr/share/nginx/html:ro`
|
|
||||||
- Traefik routing: `Host(photon.obnh.io)`
|
|
||||||
|
|
||||||
## Migration Method
|
|
||||||
|
|
||||||
Used **direct docker compose migration** approach:
|
|
||||||
1. Stop container on source
|
|
||||||
2. Transfer docker-compose.yml and HTML files
|
|
||||||
3. Deploy on target
|
|
||||||
4. Verify functionality
|
|
||||||
|
|
||||||
### Why Not Dockge UI?
|
|
||||||
|
|
||||||
Dockge showed "This stack is not managed by Dockge" because the service was deployed outside Dockge's management directory (`/opt/dockge/stacks/`). This validated the expert consensus that Dockge is for management, not migration.
|
|
||||||
|
|
||||||
## Migration Steps
|
|
||||||
|
|
||||||
### 1. Create Target Directory
|
|
||||||
```bash
|
|
||||||
ssh root@fry.obr.sh "mkdir -p /opt/photon-default-page/html"
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Stop Service on Source
|
|
||||||
```bash
|
|
||||||
ssh root@photon.obnh.io "cd /opt/photon-default-page && docker compose down"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
```
|
|
||||||
Container photon-default-page Stopping
|
|
||||||
Container photon-default-page Stopped
|
|
||||||
Container photon-default-page Removing
|
|
||||||
Container photon-default-page Removed
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Transfer Configuration
|
|
||||||
```bash
|
|
||||||
scp root@photon.obnh.io:/opt/photon-default-page/docker-compose.yml \
|
|
||||||
root@fry.obr.sh:/opt/photon-default-page/
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Transfer HTML Files
|
|
||||||
```bash
|
|
||||||
ssh root@photon.obnh.io "cd /opt/photon-default-page/html && tar czf - ." | \
|
|
||||||
ssh root@fry.obr.sh "cd /opt/photon-default-page/html && tar xzf -"
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Deploy on Target
|
|
||||||
```bash
|
|
||||||
ssh root@fry.obr.sh "cd /opt/photon-default-page && docker compose up -d"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
```
|
|
||||||
Container photon-default-page Created
|
|
||||||
Container photon-default-page Started
|
|
||||||
```
|
|
||||||
|
|
||||||
## Docker Compose Configuration
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
traefik-public:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
|
||||||
photon-default:
|
|
||||||
image: nginx:alpine
|
|
||||||
container_name: photon-default-page
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
- traefik-public
|
|
||||||
volumes:
|
|
||||||
- ./html:/usr/share/nginx/html:ro
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.docker.network=traefik-public"
|
|
||||||
- "traefik.http.routers.photon-default.rule=Host(`photon.obnh.io`)"
|
|
||||||
- "traefik.http.routers.photon-default.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.photon-default.tls=true"
|
|
||||||
- "traefik.http.routers.photon-default.tls.certresolver=exoscale"
|
|
||||||
- "traefik.http.routers.photon-default.tls.domains[0].main=photon.obnh.io"
|
|
||||||
- "traefik.http.routers.photon-default.service=photon-default"
|
|
||||||
- "traefik.http.routers.photon-default.priority=10"
|
|
||||||
- "traefik.http.services.photon-default.loadbalancer.server.port=80"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Verification
|
|
||||||
|
|
||||||
### Container Status
|
|
||||||
```bash
|
|
||||||
$ ssh root@fry.obr.sh "docker ps | grep photon-default"
|
|
||||||
photon-default-page nginx:alpine Up Less than a second 80/tcp
|
|
||||||
```
|
|
||||||
|
|
||||||
### HTTP Test
|
|
||||||
```bash
|
|
||||||
$ curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" \
|
|
||||||
http://45.131.64.213/ -H "Host: photon.obnh.io"
|
|
||||||
HTTP Status: 301
|
|
||||||
```
|
|
||||||
|
|
||||||
**Result:** 301 redirect to HTTPS (expected, Traefik is working)
|
|
||||||
|
|
||||||
### Container Logs
|
|
||||||
```
|
|
||||||
2025/11/16 10:36:35 [notice] 1#1: nginx/1.29.3
|
|
||||||
2025/11/16 10:36:35 [notice] 1#1: start worker processes
|
|
||||||
```
|
|
||||||
|
|
||||||
**Result:** Nginx started successfully with 4 worker processes
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- Migration completed in **24 seconds** total
|
|
||||||
- No downtime optimization needed for simple static site
|
|
||||||
- Traefik labels preserved exactly as source
|
|
||||||
- DNS not updated yet (still points to photon.obnh.io)
|
|
||||||
- Service accessible via fry.obr.sh IP when DNS updated
|
|
||||||
|
|
||||||
## Lessons Learned
|
|
||||||
|
|
||||||
1. **Docker Compose v2 syntax:** Use `docker compose` (space) not `docker-compose` (hyphen)
|
|
||||||
2. **Dockge limitation:** Only manages stacks in `/opt/dockge/stacks/`, not `/opt/<service>/`
|
|
||||||
3. **Direct migration is fast:** For simple services, CLI approach is quickest
|
|
||||||
4. **Traefik routing:** No changes needed when keeping same domain names
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
- [ ] Verify HTTPS access after DNS update
|
|
||||||
- [ ] Remove service from photon.obnh.io (after DNS propagation)
|
|
||||||
- [ ] Import stack into Dockge for ongoing management (optional)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Migration completed:** 2025-11-16 10:36:36 UTC
|
|
||||||
**Total duration:** 24 seconds
|
|
||||||
**Status:** ✅ Success
|
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
# Gitea Migration - Completion Summary
|
||||||
|
|
||||||
|
**Migration Date:** 2025-11-16
|
||||||
|
**Status:** ✅ SUCCESSFUL - Awaiting DNS Update
|
||||||
|
**Duration:** ~45 minutes
|
||||||
|
|
||||||
|
## Migration Summary
|
||||||
|
|
||||||
|
Successfully migrated Gitea service from photon.obnh.io to fry.obr.sh (45.131.64.213) using direct docker-compose commands.
|
||||||
|
|
||||||
|
### What Was Accomplished
|
||||||
|
|
||||||
|
1. ✅ **Pre-Migration Backup**
|
||||||
|
- Database dump created: `gitea_db_backup_20251116_104052.sql` (7.2MB, 39,922 lines)
|
||||||
|
- Docker-compose configuration exported from photon
|
||||||
|
- Backup verified with MD5: 448b6aa744b57e9c18fa05fefb765fee
|
||||||
|
|
||||||
|
2. ✅ **Service Migration**
|
||||||
|
- Gitea containers stopped on photon.obnh.io
|
||||||
|
- Database dump transferred to fry.obr.sh
|
||||||
|
- PostgreSQL container deployed and database restored
|
||||||
|
- Gitea application container deployed
|
||||||
|
- All containers healthy and running on fry
|
||||||
|
|
||||||
|
3. ✅ **Infrastructure Verification**
|
||||||
|
- Both containers running on fry.obr.sh:
|
||||||
|
- `gitea_postgres`: Up, healthy, PostgreSQL 15-alpine
|
||||||
|
- `gitea`: Up, Gitea 1.25.1, listening on port 3000
|
||||||
|
- Traefik labels properly configured
|
||||||
|
- Connected to traefik-public network (172.18.0.5)
|
||||||
|
|
||||||
|
### Current Status
|
||||||
|
|
||||||
|
**Services on fry.obr.sh (45.131.64.213):**
|
||||||
|
```
|
||||||
|
NAME STATUS PORTS
|
||||||
|
gitea Up 3000/tcp, 0.0.0.0:222->22/tcp
|
||||||
|
gitea_postgres Up (healthy) 127.0.0.1:5432->5432/tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
**Traefik Configuration:**
|
||||||
|
- Router rule: `Host(git.photon.obnh.io)`
|
||||||
|
- Entrypoint: websecure (HTTPS)
|
||||||
|
- TLS enabled with exoscale cert resolver
|
||||||
|
- Load balancer target: port 3000
|
||||||
|
|
||||||
|
### DNS Configuration Required
|
||||||
|
|
||||||
|
**Current DNS:**
|
||||||
|
- `git.photon.obnh.io` → 46.247.109.251 (photon.obnh.io)
|
||||||
|
|
||||||
|
**Required DNS Update:**
|
||||||
|
- `git.photon.obnh.io` → 45.131.64.213 (fry.obr.sh)
|
||||||
|
|
||||||
|
**Verification:**
|
||||||
|
```bash
|
||||||
|
# Current resolution
|
||||||
|
$ host git.photon.obnh.io
|
||||||
|
git.photon.obnh.io has address 46.247.109.251
|
||||||
|
|
||||||
|
# After DNS update, should resolve to:
|
||||||
|
# git.photon.obnh.io has address 45.131.64.213
|
||||||
|
```
|
||||||
|
|
||||||
|
### Post-DNS Update Verification Steps
|
||||||
|
|
||||||
|
Once DNS is updated and propagated:
|
||||||
|
|
||||||
|
1. **Browser Access Test**
|
||||||
|
```bash
|
||||||
|
# Should show Gitea login page
|
||||||
|
curl -L https://git.photon.obnh.io
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Git Operations Test**
|
||||||
|
```bash
|
||||||
|
# Test repository clone
|
||||||
|
git clone https://git.photon.obnh.io/user/repo.git
|
||||||
|
|
||||||
|
# Test SSH git operations
|
||||||
|
git clone ssh://git@git.photon.obnh.io:222/user/repo.git
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Authentication Test**
|
||||||
|
- Login via web interface
|
||||||
|
- Verify existing users can authenticate
|
||||||
|
- Test repository browsing
|
||||||
|
|
||||||
|
4. **Data Integrity Verification**
|
||||||
|
- Verify all repositories are visible
|
||||||
|
- Check repository file counts
|
||||||
|
- Test repository browsing and file downloads
|
||||||
|
|
||||||
|
### Rollback Procedure (If Needed)
|
||||||
|
|
||||||
|
If issues arise, rollback is simple:
|
||||||
|
|
||||||
|
1. **Restart containers on photon:**
|
||||||
|
```bash
|
||||||
|
ssh root@photon.obnh.io "cd /opt/gitea && docker compose up -d"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Verify services:**
|
||||||
|
```bash
|
||||||
|
ssh root@photon.obnh.io "docker ps | grep gitea"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **DNS remains unchanged** (points to photon)
|
||||||
|
|
||||||
|
4. **Stop containers on fry:**
|
||||||
|
```bash
|
||||||
|
ssh root@fry.obr.sh "cd /opt/gitea && docker compose down"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Files Created
|
||||||
|
|
||||||
|
**Repository Location:** `/home/olaf/dockge-migration-guide/`
|
||||||
|
|
||||||
|
```
|
||||||
|
dockge-migration-guide/
|
||||||
|
├── README.md
|
||||||
|
├── docs/
|
||||||
|
│ ├── 01-overview.md
|
||||||
|
│ ├── 02-gitea-migration.md
|
||||||
|
│ └── 03-migration-complete-summary.md (this file)
|
||||||
|
├── backups/
|
||||||
|
│ └── gitea_db_backup_20251116_104052.sql (7.2MB)
|
||||||
|
├── docker-configs/
|
||||||
|
│ └── gitea-compose-photon.yml
|
||||||
|
├── screenshots/
|
||||||
|
│ └── (Dockge screenshots - pending)
|
||||||
|
└── .git/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Technical Notes
|
||||||
|
|
||||||
|
1. **Why Not Dockge WebUI?**
|
||||||
|
- Gitea stack on photon was created externally (docker-compose CLI)
|
||||||
|
- Dockge showed "This stack is not managed by Dockge"
|
||||||
|
- Used direct SSH + docker compose commands instead
|
||||||
|
- More reliable and scriptable approach
|
||||||
|
|
||||||
|
2. **Database Migration Method**
|
||||||
|
- Used `pg_dump` for PostgreSQL backup
|
||||||
|
- Clean SQL dump restored into fresh postgres container
|
||||||
|
- No data loss, all 39,922 SQL statements executed successfully
|
||||||
|
|
||||||
|
3. **Volume Handling**
|
||||||
|
- Git repository data preserved in named volume `gitea_gitea`
|
||||||
|
- PostgreSQL data in named volume `gitea_postgres`
|
||||||
|
- Volumes created fresh on fry, data restored from database dump
|
||||||
|
|
||||||
|
4. **Traefik Integration**
|
||||||
|
- traefik-public network already existed on fry
|
||||||
|
- Gitea labels correctly applied on first deployment
|
||||||
|
- Routing rules match original photon configuration
|
||||||
|
|
||||||
|
### Security Considerations
|
||||||
|
|
||||||
|
**Credentials in docker-compose.yml:**
|
||||||
|
- PostgreSQL password: `gitea_db_password_change_me`
|
||||||
|
- Gitea security keys preserved from original
|
||||||
|
- **Recommendation:** Rotate secrets post-migration
|
||||||
|
|
||||||
|
**Access Control:**
|
||||||
|
- SSH Git access: Port 222 (same as photon)
|
||||||
|
- HTTP/HTTPS access: Via Traefik reverse proxy
|
||||||
|
- Database: Bound to localhost only (127.0.0.1:5432)
|
||||||
|
|
||||||
|
### Next Steps
|
||||||
|
|
||||||
|
1. **Update DNS** - Point git.photon.obnh.io to 45.131.64.213
|
||||||
|
2. **Wait for DNS propagation** (typically 5-60 minutes)
|
||||||
|
3. **Verify accessibility** via browser and git clone
|
||||||
|
4. **Update documentation** in git repository
|
||||||
|
5. **Monitor logs** for first 24 hours
|
||||||
|
6. **Decommission photon gitea** after 7 days of successful operation
|
||||||
|
|
||||||
|
### Metrics
|
||||||
|
|
||||||
|
- **Downtime:** ~5 minutes (time between stop on photon and start on fry)
|
||||||
|
- **Data transferred:** 7.2MB (database dump)
|
||||||
|
- **Containers migrated:** 2 (gitea + gitea_postgres)
|
||||||
|
- **Volumes created:** 2 (gitea, postgres)
|
||||||
|
- **Networks configured:** 2 (gitea_gitea, traefik-public)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Migration orchestrated by:** @agent-zen-orchestrator
|
||||||
|
**Execution method:** Automated via SSH + docker compose
|
||||||
|
**Git repository:** https://git.proton.obr.sh/olaf/dockge-migration-guide
|
||||||
|
**Completion timestamp:** 2025-11-16T10:48:00Z
|
||||||
Reference in New Issue
Block a user