# Easypanel Deployment - MoreminiMore Redesign

## ⚠️ API Access Issue

The Easypanel API at `http://110.164.146.46:3000` is currently returning HTML responses instead of JSON. This may be due to:

1. API endpoint changes in Easypanel 2.24.0
2. Token permissions need updating
3. API access needs to be enabled in Easypanel settings

**Credentials verified:**
- URL: http://110.164.146.46:3000
- Token: cmm8n35t2000n07p9214bdq5x
- Project: customerwebsite

## ✅ Manual Deployment Steps (2 Minutes)

### 1. Login to Easypanel
Navigate to: **http://110.164.146.46:3000**

### 2. Select Project
Click on: **customerwebsite**

### 3. Create New Service
- Click **"New Service"**
- Select **"Git Repository"**

### 4. Configure Git Repository
| Field | Value |
|-------|-------|
| **Name** | `moreminimore-redesign` |
| **Repository URL** | `https://git.moreminimore.com/kunthawat/moreminimore-website.git` |
| **Branch** | `main` |
| **Username** | [Your Gitea username] |
| **Password** | [Your Gitea password/token] |

### 5. Docker Configuration
| Setting | Value |
|---------|-------|
| **Dockerfile** | `Dockerfile` |
| **Port** | `4321` |
| **Command** | (leave default) |

### 6. Enable Auto-Deploy
- Go to **Settings** → **Auto Deploy**
- Enable for branch: `main`
- Save

### 7. Deploy
- Click **"Deploy Now"**
- Wait 2-3 minutes for build
- Verify website loads

## 🔧 Fix API Access (Optional)

If you want to use API deployment:

1. Login to Easypanel
2. Go to Settings → API
3. Regenerate API token
4. Update `~/.easypanel/credentials`
5. Test with:
```bash
curl http://110.164.146.46:3000/api/user -H "Authorization: Bearer YOUR_NEW_TOKEN"
```

## 📊 Service Configuration Summary

```yaml
Service: moreminimore-redesign
Project: customerwebsite
Repository: https://git.moreminimore.com/kunthawat/moreminimore-website.git
Branch: main
Port: 4321
Dockerfile: Dockerfile
Auto-Deploy: main branch
```

## ✅ Post-Deployment Checklist

- [ ] Website loads at service URL
- [ ] All pages accessible
- [ ] Images load correctly
- [ ] Responsive design works
- [ ] Auto-deploy enabled

## 🚀 Ongoing Updates

After deployment, updates are automatic:

```bash
cd moreminimore-redesign
git add .
git commit -m "Update: [description]"
git push origin main
# Easypanel auto-deploys in 1-2 minutes
```

## 📞 Support

If you encounter issues:
1. Check Easypanel logs: Service → Logs
2. Verify Docker build succeeded
3. Check container is running
4. Review deployment logs
