- Move Astro files from dealplustech-astro/ to project root - Update Dockerfile: PORT environment variable (default 80) - Add vite.config.ts with allowedHosts: true - Matches nixpacks behavior for Easypanel deployment - No hardcoded ports or domains
5.5 KiB
5.5 KiB
🚀 Gitea Repository Deployment - BEST METHOD!
✅ Why This is Better
| Method | Docker Registry | Gitea Repo |
|---|---|---|
| Build locally | ✅ Required | ❌ Not needed |
| Push to registry | ✅ Required | ❌ Not needed |
| Easypanel builds | ❌ No | ✅ Yes! |
| Auto-deploy on push | ❌ No | ✅ Yes! |
| Version control | ❌ No | ✅ Yes! |
| Rollbacks | ❌ Hard | ✅ Easy |
🎯 How It Works
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ You Git │ │ Easypanel │ │ Deployed │
│ Push │────▶│ Clones & │────▶│ Service │
│ to Gitea │ │ Builds │ │ Running │
└─────────────┘ └──────────────┘ └─────────────┘
Easypanel will:
- Clone your Gitea repository
- Run
npm install - Run
npm run build - Deploy the
dist/folder - Serve on port 4321
📋 Setup Steps
Step 1: Run Deploy Script
cd dealplustech-astro
./skills/easypanel-deploy/deploy.sh deploy
It will show:
Gitea URL: http://110.164.146.46:3001
Repository: dealplustech/dealplustech-astro
Branch: main
Build Command: npm run build
Publish Directory: dist
Port: 4321
Step 2: Create Service in Easypanel
1. Open: http://110.164.146.46:3000
2. Select Project: customerwebsite
3. Click: New Service → Git Repository
4. Configure:
┌─────────────────────────────────────┐
│ Repository URL: │
│ http://110.164.146.46:3001/ │
│ dealplustech/dealplustech-astro │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Branch: main │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Build Command: npm run build │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Publish Directory: dist │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Port: 4321 │
└─────────────────────────────────────┘
5. Click: Deploy
Step 3: Wait for Build
Easypanel will:
- ✅ Clone from Gitea (~10 seconds)
- ✅ Run
npm install(~30 seconds) - ✅ Run
npm run build(~20 seconds) - ✅ Deploy
dist/(~5 seconds)
Total: ~1 minute
Step 4: Register Service ID
After deployment completes:
# Copy Service ID from Easypanel dashboard
./skills/easypanel-deploy/deploy.sh register svc_xxx...
🔄 Automatic Updates
Enable Auto-Deploy
In Easypanel:
- Go to service settings
- Click: Git → Auto Deploy
- Enable: Auto Deploy on Push
Then:
# Make changes
git add .
git commit -m "Update something"
git push
# Easypanel automatically rebuilds! 🎉
Manual Redeploy
./skills/easypanel-deploy/deploy.sh redeploy
✅ Benefits
1. No Docker Registry
- ❌ No
docker build - ❌ No
docker push - ❌ No registry credentials
2. Automatic Deployments
- ✅ Push to Gitea
- ✅ Easypanel rebuilds
- ✅ Zero manual steps
3. Version Control
- ✅ Every commit = potential deployment
- ✅ Easy rollbacks
- ✅ Change history
4. Build Caching
- ✅
node_modulescached - ✅ Faster builds
- ✅ Efficient
🔧 Configuration
Gitea Repository
URL: http://110.164.146.46:3001
Owner: dealplustech
Repo: dealplustech-astro
Branch: main
Build Settings
Build Command: npm run build
Publish Directory: dist/
Node Version: 20 (from .nvmrc or package.json)
Environment Variables
Add in Easypanel service settings:
NODE_ENV=production
NEXT_PUBLIC_SITE_URL=https://your-domain.com
📁 Required Files
Your repository should have:
dealplustech-astro/
├── package.json ✅ Required (defines build)
├── Dockerfile ⚠️ Optional (for Docker mode)
├── astro.config.mjs ✅ Required
├── src/ ✅ Required
└── .gitignore ✅ Required
🎯 Next Action
Deploy now:
# 1. Run deployment script
./skills/easypanel-deploy/deploy.sh deploy
# 2. Follow instructions to create service in Easypanel
# 3. After deployment:
./skills/easypanel-deploy/deploy.sh register SERVICE_ID
# 4. Enable auto-deploy in Easypanel
# 5. Future updates: just git push!
This is THE BEST way to deploy! 🎉
- No Docker needed
- No registry needed
- Automatic deployments
- Full version control