deploy
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 1m32s

This commit is contained in:
2026-01-26 02:19:48 +01:00
parent ac1e22017e
commit 574d5a8a9a
6 changed files with 293 additions and 27 deletions

View File

@@ -225,31 +225,61 @@ GET /robots.txt
## 🚀 Deployment
### Vercel (Recommended)
```bash
# Install Vercel CLI
npm i -g vercel
### Automatic Deployment (Current Setup)
# Deploy
vercel --prod
The project uses **Gitea Actions** for CI/CD. Every push to `main` triggers:
1. **Build**: Docker image built for `linux/arm64`
2. **Push**: Image pushed to `registry.infra.mintel.me`
3. **Deploy**: SSH to production server, pull and restart containers
**Workflow**: `.gitea/workflows/deploy.yml`
**Required Secrets** (configure in Gitea repository settings):
- `REGISTRY_USER` - Docker registry username
- `REGISTRY_PASS` - Docker registry password
- `ALPHA_SSH_KEY` - SSH private key for deployment
- `NEXT_PUBLIC_UMAMI_WEBSITE_ID` - Analytics ID
- `NEXT_PUBLIC_UMAMI_SCRIPT_URL` - Analytics script URL
- `SENTRY_DSN` - Error tracking DSN
### Manual Deployment
```bash
# SSH into production server
ssh deploy@alpha.mintel.me
# Navigate to project
cd /home/deploy/sites/klz-cables.com
# Pull latest image and restart
docker compose pull
docker compose up -d --force-recreate --remove-orphans
docker image prune -f
```
### Static Export
Or use the convenience script:
```bash
# Build and export
npm run build
npm run export
# Deploy to any static host
# Upload /out directory
bash scripts/deploy-webhook.sh
```
### Netlify
```bash
# Connect repository
# Set build command: npm run build
# Set publish directory: out
### Architecture
```
Client → Traefik (TLS) → Varnish (Cache) → Next.js App
```
**Domains**:
- `klz-cables.com` - Production
- `www.klz-cables.com` - Production (www)
- `staging.klz-cables.com` - Staging
**Services**:
- `app`: Next.js application (port 3000)
- `varnish`: HTTP cache layer
- `traefik`: Reverse proxy (external)
For detailed deployment documentation, see [`docs/DEPLOYMENT.md`](docs/DEPLOYMENT.md).
## 📈 Performance