Files
dealplustech/AUTOMATED_DEPLOYMENT.md
Kunthawat Greethong 6b974073cb fix: Fix PostCSS config and Dockerfile
1. Rename postcss.config.js to postcss.config.cjs
   - Fixes CommonJS syntax in ES module project
   - Allows build to complete successfully

2. Remove --production flag from Dockerfile
   - Install ALL dependencies including sharp
   - Sharp required for Astro image optimization
   - Fixes sharp missing error

Both fixes enable successful Docker build and favicon to work.
2026-03-03 14:51:29 +07:00

2.4 KiB

🚀 Fully Automated Deployment - v5.0

Complete Workflow

The skill now automates ALL steps:

Step 1: Create Service

POST /api/trpc/services.app.createService
{
  "json": {
    "projectName": "customerwebsite",
    "domains": [{"host": "$(EASYPANEL_DOMAIN)"}],
    "serviceName": "dealplustech-astro"
  }
}

Step 2: Configure Git

POST /api/trpc/services.app.updateSourceGit
{
  "json": {
    "projectName": "customerwebsite",
    "serviceName": "dealplustech-astro",
    "repo": "http://110.164.146.46:3001/dealplustech/dealplustech-astro.git",
    "ref": "main",
    "path": "/"
  }
}

Step 3: Set Build Type

POST /api/trpc/services.app.updateBuild
{
  "json": {
    "projectName": "customerwebsite",
    "serviceName": "dealplustech-astro",
    "build": {"type": "nixpacks"}
  }
}

Step 4: Get Primary Domain

GET /api/trpc/domains.getPrimaryDomain
{
  "json": {
    "projectName": "customerwebsite",
    "serviceName": "dealplustech-astro"
  }
}

Step 5: Wait for Deployment

  • Polls service status every 10 seconds
  • Waits up to 5 minutes (30 attempts)
  • Reports when status is "running" or "ready"

🎯 Usage

First Deployment

cd dealplustech-astro
./skills/easypanel-deploy/deploy.sh deploy

That's it! The script handles everything automatically!

Redeploy After Changes

git push  # Push your changes
./skills/easypanel-deploy/deploy.sh redeploy  # Trigger redeploy

Check Status

./skills/easypanel-deploy/deploy.sh status

Benefits

Feature Before v5.0 v5.0
Manual steps 4-6 steps 0 steps
Time required 5-10 minutes 1 command
API calls N/A 5 automated calls
Error handling Manual Automatic
Wait for deploy Manual Automatic
Domain info Manual lookup Automatic

📋 What Happens

1. ./deploy.sh deploy
   ↓
2. Creates service in Easypanel
   ↓
3. Configures Git repository
   ↓
4. Sets build type (nixpacks)
   ↓
5. Gets auto-generated domain
   ↓
6. Waits for deployment
   ↓
7. ✅ Deployment complete!

Zero manual steps!


🎉 Ready to Test!

# Deploy now!
./skills/easypanel-deploy/deploy.sh deploy

Status: Fully Automated
Automation Level: 100%
Manual Steps: 0