Production Deployment¶
This section covers deploying GoForge to a production server.
Deployment Options¶
| Method | Best For | Complexity |
|---|---|---|
| Docker Compose | Most deployments | Low |
| Systemd | Bare metal servers | Medium |
Production Checklist¶
Before deploying GoForge to production, ensure:
Security¶
- [ ]
GOFORGE_DEV_MODE=false - [ ] Strong, unique
ENCRYPTION_KEYgenerated (openssl rand -base64 32) - [ ] Strong, unique
SESSION_SECRETgenerated - [ ] Strong, unique
CSRF_SECRETgenerated - [ ] Strong database password (not the default
password) - [ ]
DATABASE_URLusessslmode=requireor stronger - [ ] GitHub OAuth callback URL uses HTTPS
- [ ] Traefik dashboard disabled or authenticated
Networking¶
- [ ] Domain DNS pointing to server
- [ ] Ports 80 and 443 open (for Let's Encrypt and HTTPS)
- [ ]
GOFORGE_BASE_URLset tohttps://your-domain.com - [ ]
GOFORGE_DOMAINset toyour-domain.com - [ ]
ACME_EMAILset to a valid email for Let's Encrypt
Infrastructure¶
- [ ] Docker Engine installed and running
- [ ] Sufficient disk space for Docker images and volumes
- [ ] PostgreSQL database accessible
- [ ] Firewall configured (allow 80, 443; block direct access to 8080, 5432)
Monitoring¶
- [ ] Log aggregation configured (journald, syslog, or Docker logging driver)
- [ ] Health check endpoint monitored (
/health) - [ ] Disk space monitoring (Docker images can accumulate)
- [ ] Database backup strategy in place
Resource Recommendations¶
| Component | CPU | RAM | Disk |
|---|---|---|---|
| GoForge | 1 core | 512 MB | 1 GB |
| PostgreSQL | 1 core | 1 GB | 10 GB |
| Traefik | 0.5 core | 256 MB | 100 MB |
| Docker Images/Containers | 2+ cores | 2+ GB | 20+ GB |
| Total (minimum) | 2 cores | 4 GB | 30+ GB |
Upgrading¶
Docker Compose¶
Systemd¶
git pull origin main
make build
sudo systemctl stop goforge
sudo cp bin/goforge /opt/goforge/
sudo cp -r static /opt/goforge/
sudo systemctl start goforge
Database Migrations¶
Migrations run automatically on startup. For manual control: