feat(services): migrate Docker Compose configurations from GitLab

Migrate all docker-compose service configurations from legacy GitLab instance
to homelab repository for consolidation and version control.

Services migrated (6):
- bytestash: Code snippet management
- filebrowser: Web-based file browser
- gitlab: QoL scripts for NPM cert sync
- paperless-ngx: Document management with OCR
- portainer: Docker management UI
- speedtest-tracker: Internet speed test tracker

Changes:
- Add services/ directory with complete configurations
- Update .gitignore with Docker Compose exclusions
- Create comprehensive services/README.md documentation
- Document migration process in CLAUDE_STATUS.md

Migration details:
- Source: https://vulcan.apophisnetworking.net/jramos/homelab.git
- Files migrated: 10 files (6 compose + 3 utilities + 1 README)
- Total size: 84 KB
- Lines added: 836

Security notes:
- .env files excluded from git
- Hardcoded secrets identified in documentation
- Review and update secrets before deployment

Related: GitLab VM 101 decommissioning preparation

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-02 14:34:32 -07:00
parent 779ae2fb24
commit 3eea6b1b4e
15 changed files with 836 additions and 0 deletions

View File

@@ -502,4 +502,307 @@ n8n starts → CREATE TABLE migrations → SUCCESS → run migrations → tables
---
## Current Task: Push Repository to Gitea
**Started**: 2025-12-02
**Completed**: 2025-12-02
**Goal**: Configure git remote and push homelab repository to self-hosted Gitea instance
**Phase**: ✅ COMPLETED
**Gitea Instance**: http://192.168.2.102:3060/jramos/homelab.git
**Status**: Repository successfully pushed to Gitea with all history and documentation
### Task Breakdown
- [x] **Step 1**: Configure git remote with username
- Status: Completed at 2025-12-02
- Owner: Librarian
- Action: Updated origin remote from `http://192.168.2.102:3060/jramos/homelab.git` to `http://jramos@192.168.2.102:3060/jramos/homelab.git`
- Result: Remote configured successfully, ready for authentication
- [x] **Step 2**: Configure authentication (Personal Access Token)
- Status: Completed at 2025-12-02
- Owner: User + Librarian
- Action: User created PAT in Gitea web interface at http://192.168.2.102:3060
- Implementation: Updated remote URL to include PAT: `http://jramos:<TOKEN>@192.168.2.102:3060/jramos/homelab.git`
- Result: Authentication configured successfully
- [x] **Step 3**: Complete push operation
- Status: Completed at 2025-12-02
- Owner: Librarian
- Action: Executed `git push -u origin main` with PAT authentication
- Result: Successfully pushed main branch to Gitea (processed 1 reference, created new branch)
- Branch tracking: main branch now tracks origin/main
- Commits pushed: 5 recent commits including all n8n documentation and fixes
### Deployment Summary
**Push Operation Results**:
```
To http://192.168.2.102:3060/jramos/homelab.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'
```
**Repository State After Push**:
- Branch: main → origin/main (tracking configured)
- Latest commit: 779ae2f "docs(n8n): enhance setup guide with PostgreSQL 15+ fixes and encryption key validation"
- Total commits pushed: Complete repository history (5+ commits visible in recent log)
- Remote verification: ✅ Successful
**Commits Included in Push**:
1. `779ae2f` - docs(n8n): enhance setup guide with PostgreSQL 15+ fixes and encryption key validation
2. `a626c48` - docs(n8n): complete PostgreSQL 15+ troubleshooting and add operational scripts
3. `fe75402` - docs(n8n): document troubleshooting session for 502 Bad Gateway issue
4. `c16d521` - docs(n8n): correct architecture for Debian 12 and Nginx Proxy Manager
5. `a1841f1` - docs(infrastructure): add MCP setup and n8n deployment documentation
**Gitea Repository Status**:
- URL: http://192.168.2.102:3060/jramos/homelab
- Main branch: Created and populated
- Authentication: PAT-based (secure, revocable)
- Future pushes: Will use existing authentication automatically
**Pending Local Changes** (not included in push):
- Modified: CLAUDE_STATUS.md (this file - documenting the push operation)
- Untracked: scripts/fix_n8n_db_c_locale.sh (operational script from n8n troubleshooting)
### Authentication Method Selected
**Option 3: Personal Access Token (PAT)**
- Most secure method for automated/scripted operations
- Token replaces password in remote URL
- Allows granular permission control
- Can be revoked without changing account password
**Alternative Methods (Not Selected)**:
- Option 1: Username + Password prompt (blocked by non-interactive environment)
- Option 2: Credential helper caching (requires initial password prompt, same blocker)
### Files Referenced
- `.git/config` - Git remote configuration
- Gitea Web UI - Personal Access Token creation (http://192.168.2.102:3060/user/settings/applications)
---
## Current Task: Migrate Docker Compose Configurations from GitLab to Gitea
**Started**: 2025-12-02
**Completed**: 2025-12-02 14:20 MST
**Goal**: Migrate all docker-compose service configurations from old GitLab instance to current homelab repository and Gitea
**Phase**: ✅ COMPLETED
**Status**: Successfully Migrated - Ready for Commit
### Context
User has two git platforms:
- **Old Platform**: GitLab instance at https://vulcan.apophisnetworking.net with repository `jramos/homelab`
- **New Platform**: Gitea instance on 192.168.2.102:3060 (already configured and working)
**Migration Goal**: Move docker-compose configurations from GitLab to this repository, enabling eventual decommissioning of GitLab VM 101.
### Migration Summary
**Source**: https://vulcan.apophisnetworking.net/jramos/homelab.git
**Authentication**: Personal Access Token (PAT) via oauth2 protocol
**Clone Protocol**: HTTPS (http redirect to https)
**Destination**: `/home/jramos/homelab/services/`
**Migration Method**: Automated via Claude Code
### Services Migrated
Successfully migrated **6 services** with complete configurations:
1. **bytestash** - Code snippet management system
- Port: 5000
- Image: ghcr.io/jordan-dalby/bytestash:latest
- Files: docker-compose.yaml
2. **filebrowser** - Web-based file browser
- Port: 8095
- Image: filebrowser/filebrowser:latest
- Files: docker-compose.yaml
3. **gitlab** - GitLab QoL utilities
- Scripts: sync-npm-certs.sh
- Systemd units: sync-npm-certs.service, sync-npm-certs.timer
- Purpose: Automated NPM certificate synchronization
4. **paperless-ngx** - Document management system with OCR
- Port: 8000
- URL: https://atlas.apophisnetworking.net
- Multi-container stack: webserver, PostgreSQL 17, Redis 8, Gotenberg, Tika
- Files: docker-compose.yaml, .env
5. **portainer** - Docker container management UI
- Ports: 8000 (edge agent), 9443 (web UI)
- Image: portainer/portainer-ce:latest
- Files: docker-compose.yaml
6. **speedtest-tracker** - Internet speed test tracker
- Ports: 8180 (HTTP), 8143 (HTTPS)
- Image: lscr.io/linuxserver/speedtest-tracker:latest
- Files: docker-compose.yaml
### File Statistics
- **Total Files Migrated**: 10 files (excluding .gitkeep placeholders)
- **Total Directories**: 9 directories (including subdirectories)
- **Total Size**: 84 KB
- **Docker Compose Files**: 6 services with compose configurations
- **Additional Files**: 3 GitLab utility files (scripts and systemd units)
### Task Breakdown
- [x] **Step 1**: Resolve GitLab instance access
- Status: Completed at 2025-12-02 14:17 MST
- Owner: General-purpose agent
- Action: Identified GitLab at https://vulcan.apophisnetworking.net
- Result: Successfully authenticated with PAT via oauth2 protocol
- [x] **Step 2**: Clone GitLab repository
- Status: Completed at 2025-12-02 14:19 MST
- Owner: General-purpose agent
- Action: Cloned jramos/homelab from GitLab to /tmp/gitlab-homelab-migration
- Result: 6 service directories successfully cloned
- [x] **Step 3**: Create `/services/` directory structure
- Status: Completed at 2025-12-02 14:20 MST
- Owner: General-purpose agent
- Action: Created /home/jramos/homelab/services/ directory
- Result: Target directory ready for migration
- [x] **Step 4**: Migrate docker-compose service folders
- Status: Completed at 2025-12-02 14:20 MST
- Owner: General-purpose agent
- Action: Copied all 6 service folders maintaining complete structure
- Result: All services migrated to /home/jramos/homelab/services/
- [x] **Step 5**: Update .gitignore for services
- Status: Completed at 2025-12-02 14:20 MST
- Owner: General-purpose agent
- Action: Added Docker Compose service exclusions section
- Result: Excludes .env files, volumes/, data/, logs/, *.db, *.log, node_modules/
- [x] **Step 6**: Create services documentation
- Status: Completed at 2025-12-02 14:20 MST
- Owner: General-purpose agent
- Action: Created comprehensive /home/jramos/homelab/services/README.md
- Result: 400+ line documentation with deployment guides, troubleshooting, security notes
- [x] **Step 7**: Clean up and stage changes
- Status: Completed at 2025-12-02 14:20 MST
- Owner: General-purpose agent
- Action: Removed temporary clone, staged all changes for git commit
- Result: 14 files staged (13 new, 1 modified)
### Git Status After Migration
**Changes Staged for Commit**:
- Modified: `.gitignore` (added service exclusions)
- New: `services/README.md` (comprehensive documentation)
- New: 6 service directories with docker-compose configurations
- New: 3 GitLab utility files (sync-npm-certs scripts and systemd units)
**Files Excluded from Commit** (via .gitignore):
- `services/paperless-ngx/.env` (contains secrets)
- All `.gitkeep` placeholder files
**Line Ending Warnings**: Git will normalize CRLF to LF in 7 docker-compose files (expected behavior for cross-platform compatibility)
### Structure After Migration
```
/home/jramos/homelab/services/
├── README.md # Comprehensive service documentation
├── bytestash/
│ ├── .gitkeep
│ └── docker-compose.yaml
├── filebrowser/
│ ├── .gitkeep
│ └── docker-compose.yaml
├── gitlab/
│ ├── QoL Config Files/
│ │ ├── sync-npm-certs.service
│ │ └── sync-npm-certs.timer
│ └── QoL Scripts/
│ └── sync-npm-certs.sh
├── paperless-ngx/
│ ├── .env # Excluded from git
│ └── docker-compose.yaml
├── portainer/
│ ├── .gitkeep
│ └── docker-compose.yaml
└── speedtest-tracker/
├── .gitkeep
└── docker-compose.yaml
```
### Security Considerations
**Secrets Identified in Migrated Files**:
1. **bytestash/docker-compose.yaml**:
- `JWT_SECRET: your-secret` (placeholder - needs replacement)
2. **paperless-ngx/docker-compose.yaml**:
- Database password: `paperless` (should be changed)
- Contains `.env` file (excluded from git via .gitignore)
3. **speedtest-tracker/docker-compose.yaml**:
- `APP_KEY: base64:h1jjtLUHV//AKUdBC2a7MUpNQrs5fgJ30Ia522iP+/E=` (pre-generated)
**Recommendations**:
- Change all default passwords before deployment
- Move hardcoded secrets to .env files
- Rotate JWT secrets and app keys
- Review volume mount permissions (filebrowser mounts entire filesystem)
### Post-Migration Tasks
**Immediate Actions Required** (before deployment):
- [ ] Review and update secrets in docker-compose files
- [ ] Create/update `.env` files with production credentials
- [ ] Verify host volume mount paths exist:
- `/home/jramos/docker/bytestash/data`
- `/home/docker/filebrowser/`
- `/home/jramos/paperless-ngx/consume`
- `/home/jramos/docker/speedtest-tracker/config`
- [ ] Ensure `portainer_data` Docker volume exists
**Recommended Next Steps**:
- [ ] Commit staged changes to git
- [ ] Push to Gitea repository
- [ ] Test service deployments one by one
- [ ] Configure NPM proxy hosts for external access
- [ ] Document any deployment-specific customizations
- [ ] Plan GitLab VM 101 decommissioning timeline
### Lessons Learned
**GitLab Access Resolution**:
- Initial clone attempts failed at 192.168.2.101 (NPM, not GitLab)
- GitLab VM 101 was powered off according to Proxmox status
- Actual GitLab accessible at domain: https://vulcan.apophisnetworking.net
- oauth2 PAT format required for git clone authentication
**Migration Best Practices**:
- Always use PATs instead of passwords for git authentication
- Temporary clones in /tmp for security (auto-cleanup)
- Comprehensive .gitignore patterns before committing
- Document services during migration, not after
- Stage changes for user review before committing
### Files Referenced
**Migrated Content**:
- Source: https://vulcan.apophisnetworking.net/jramos/homelab.git
- Destination: `/home/jramos/homelab/services/`
- Documentation: `/home/jramos/homelab/services/README.md`
- Git Configuration: `/home/jramos/homelab/.gitignore` (updated)
**Temporary Files** (cleaned up):
- `/tmp/gitlab-homelab-migration/` (removed after successful migration)
---
**Repository**: /home/jramos/homelab | **Branch**: main