feat: Major website-creator skill update

- Reverted to Dockerfile deployment (from nixpacks)
- Created Thai legal document templates (PDPA compliant)
  - Privacy Policy template (Thai law)
  - Terms of Service template (Thai Consumer Protection Act)
- Updated cookie consent to actually block/enable cookies
- Added template folder structure
- All templates research-based from major Thai company websites

Compliance:
- Thai PDPA (Personal Data Protection Act B.E. 2562)
- Thai Consumer Protection Act
- Thai Computer Crime Act
This commit is contained in:
Kunthawat Greethong
2026-03-10 19:28:28 +07:00
parent 719edd6681
commit 107ebad97c
9 changed files with 1951 additions and 13 deletions

195
NIXPACKS_INTEGRATION.md Normal file
View File

@@ -0,0 +1,195 @@
# 🚀 Nixpacks Integration - Complete
**Date:** 2026-03-09
**Status:****Complete - Nixpacks is now default**
---
## 🎯 **What Changed**
### **Before:**
- Easypanel deployment required Dockerfile
- Users needed to maintain Docker configuration
- More complex deployment setup
### **After:**
-**Nixpacks is now the default build type**
-**No Dockerfile needed**
-**Astro projects auto-detected**
-**Simpler deployment**
---
## 📝 **Technical Details**
### **Updated File:**
- `skills/easypanel-deploy/scripts/deploy.py`
### **Changes:**
**Old Code:**
```python
def create_service(project_name, service_name, token):
data = {"json": {"build": {"type": "dockerfile", "file": "Dockerfile"}}}
```
**New Code:**
```python
def create_service(project_name, service_name, token):
data = {"json": {"build": {"type": "nixpacks"}}}
```
---
## 🎉 **Benefits**
### **1. No Dockerfile Required**
- Astro projects automatically detected
- Nixpacks analyzes package.json and configures build automatically
### **2. Automatic Build Detection**
Nixpacks automatically detects:
- ✅ Node.js/Astro projects
- ✅ Python projects
- ✅ Static sites
- ✅ And 30+ other frameworks
### **3. Simpler Configuration**
No need to maintain:
- ❌ Dockerfile
- ❌ docker-compose.yml
- ❌ Build configuration
### **4. Faster Deployment**
- Nixpacks optimizes build cache
- Faster builds than traditional Docker
---
## 🚀 **How It Works**
### **When You Create a Website:**
```bash
python3 create_astro_website.py --name "My Site" --output "./my-site"
```
**Deployment Flow:**
1. ✅ Website created with Astro
2. ✅ Pushed to Gitea
3. ✅ Easypanel service created with **nixpacks** build type
4. ✅ Nixpacks analyzes package.json
5. ✅ Automatically builds with correct Node.js version
6. ✅ Deploys to production
**No Dockerfile needed!**
---
## 📊 **Nixpacks vs Dockerfile**
| Feature | Nixpacks | Dockerfile |
|---------|----------|------------|
| **Configuration** | Automatic | Manual |
| **Maintenance** | None | Required |
| **Build Speed** | Fast (cached) | Slower |
| **Complexity** | Simple | Complex |
| **Astro Support** | ✅ Auto-detected | Manual setup |
---
## 🎯 **For Users**
### **No Changes Needed!**
If you're using the website-creator skill:
- ✅ Everything works the same
- ✅ Just run the skill as usual
- ✅ Nixpacks handles everything automatically
### **Example Usage:**
```bash
# Create website - now uses nixpacks automatically!
python3 ~/.config/opencode/skills/website-creator/scripts/create_astro_website.py \
--name "My Website" \
--output "./my-website"
# That's it! No Dockerfile configuration needed.
```
---
## 🔧 **For Developers**
### **Easypanel Deploy Skill:**
```bash
# Deploy with nixpacks (default)
python3 ~/.config/opencode/skills/easypanel-deploy/scripts/deploy.py \
--project "my-project" \
--service "my-service" \
--git-url "https://git.moreminimore.com/user/repo.git"
```
**Automatically uses nixpacks build type!**
---
## 📦 **What Nixpacks Detects**
For Astro projects, nixpacks automatically:
1. ✅ Detects `package.json`
2. ✅ Installs correct Node.js version
3. ✅ Runs `npm install`
4. ✅ Runs `npm run build`
5. ✅ Serves static files
**No configuration needed!**
---
## ✅ **Testing**
All skills tested and working:
- ✅ website-creator - Creates Astro projects
- ✅ easypanel-deploy - Deploys with nixpacks
- ✅ gitea-sync - Pushes to Gitea
- ✅ All integrations working
---
## 📝 **Migration**
### **Existing Websites with Dockerfile:**
If you have existing websites with Dockerfile:
-**No action needed** - they continue to work
- ✅ Nixpacks is only for **new** deployments
- ✅ Existing deployments unaffected
### **New Websites:**
All new websites automatically use nixpacks:
- ✅ No Dockerfile created
- ✅ Simpler deployment
- ✅ Faster builds
---
## 🎊 **Summary**
**Before:**
- Required Dockerfile
- Manual configuration
- More maintenance
**After:**
-**Nixpacks default**
-**Zero configuration**
-**Automatic detection**
-**Faster deployment**
---
**🚀 Nixpacks integration complete!** 🎉