Files
corrosion-admin-panel/infra
Vantz Stockwell 48209cebdd fix: Remap SeaweedFS ports to avoid conflicts on asgard
Port conflicts on asgard stack:
- 9333 → 8093 (SeaweedFS Master)
- 8080 → 8094 (SeaweedFS Volume)

Updated:
- docker-compose.yml
- README.md
- NPM-CONFIG.md

Final port allocation:
8090: Gitea HTTP
2222: Gitea SSH
8091: SeaweedFS Filer UI (cdn.corrosionmgmt.com)
8092: SeaweedFS S3 API
8093: SeaweedFS Master (internal)
8094: SeaweedFS Volume (internal)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 13:14:52 -05:00
..

Corrosion Infrastructure Stack

Purpose: Dedicated infrastructure services (Git, CDN) separated from application stack for operational resilience.

Services

Gitea (git.corrosionmgmt.com)

  • Container: corrosion-gitea
  • Host Port: 8090
  • SSH Port: 2222
  • Database: SQLite (self-contained)
  • Purpose: Source control, CI/CD, companion agent releases

SeaweedFS (cdn.corrosionmgmt.com)

  • Container: corrosion-cdn
  • Filer UI Port: 8091 (primary CDN interface)
  • S3 API Port: 8092 (programmatic access)
  • Master Port: 8093 (admin/monitoring)
  • Volume Port: 8094 (internal storage)
  • Purpose: Map hosting, plugin packages, companion binaries, backups

Deployment

First-time setup:

cd infra
docker compose up -d

Nginx Proxy Manager Configuration:

Proxy Host 1: Git

  • Domain: git.corrosionmgmt.com
  • Forward IP: <asgard-internal-ip> (e.g., 192.168.x.x or 172.17.0.1)
  • Forward Port: 8090
  • Websockets: Enable
  • SSL: Force SSL, HTTP/2 Support

Proxy Host 2: CDN

  • Domain: cdn.corrosionmgmt.com
  • Forward IP: <asgard-internal-ip>
  • Forward Port: 8091
  • Websockets: Enable
  • SSL: Force SSL

Architecture Benefits

  1. Resilience: Restarting Corrosion app doesn't affect Git/CDN
  2. Simplicity: No shared database dependencies
  3. Separation: Infrastructure vs application concerns
  4. Scalability: Can move to dedicated hardware later

Access Points

First-time Gitea Setup

  1. Navigate to https://git.corrosionmgmt.com
  2. Initial setup wizard will appear
  3. Accept defaults (SQLite database pre-configured)
  4. Create admin account
  5. Enable Actions in admin panel

S3 Configuration (for Backend API)

Add to Corrosion backend .env:

S3_ENDPOINT=http://<asgard-internal-ip>:8092
S3_ACCESS_KEY=<generate-random-key>
S3_SECRET_KEY=<generate-random-secret>
S3_BUCKET=corrosion-maps
S3_REGION=us-east-1

Maintenance

# View logs
docker compose logs -f

# Restart services
docker compose restart

# Update images
docker compose pull
docker compose up -d

# Backup data
tar -czf gitea-backup-$(date +%Y%m%d).tar.gz gitea/
tar -czf seaweedfs-backup-$(date +%Y%m%d).tar.gz seaweedfs/

Integration with Corrosion

  • Companion agent binaries → Gitea releases
  • Map files → SeaweedFS buckets
  • Custom plugins → Gitea private repos (Phase 3)
  • Backup snapshots → SeaweedFS volumes