- Completed in 24 seconds using direct docker compose approach - Validated expert consensus: Dockge for management, not migration - Service running successfully on fry.obr.sh - HTTP 301 response confirms Traefik routing works - Container logs show nginx started correctly Next: Gitea and Mastodon migrations (complex, need specialized agents)
4.3 KiB
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:
- Stop container on source
- Transfer docker-compose.yml and HTML files
- Deploy on target
- 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
ssh root@fry.obr.sh "mkdir -p /opt/photon-default-page/html"
2. Stop Service on Source
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
scp root@photon.obnh.io:/opt/photon-default-page/docker-compose.yml \
root@fry.obr.sh:/opt/photon-default-page/
4. Transfer HTML Files
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
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
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
$ ssh root@fry.obr.sh "docker ps | grep photon-default"
photon-default-page nginx:alpine Up Less than a second 80/tcp
HTTP Test
$ 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
- Docker Compose v2 syntax: Use
docker compose(space) notdocker-compose(hyphen) - Dockge limitation: Only manages stacks in
/opt/dockge/stacks/, not/opt/<service>/ - Direct migration is fast: For simple services, CLI approach is quickest
- 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