Files
moreminimore-website/DEPLOYMENT.md
2026-03-03 21:18:55 +07:00

145 lines
3.1 KiB
Markdown

# Deployment Guide - MoreminiMore Redesign
## Overview
This website is deployed using **Easypanel** with automatic deployment from **Gitea**.
## Architecture
- **Framework**: Astro (Static Site Generator)
- **Styling**: Tailwind CSS v4
- **Container**: Docker (Node.js 20 Alpine)
- **Git**: Gitea (gitea.moreminimore.com)
- **Deployment**: Easypanel (Auto-deploy on push)
## Directory Structure
```
moreminimore-redesign/
├── src/
│ ├── pages/ # Astro pages (routes)
│ │ ├── index.astro # Homepage
│ │ ├── about-us.astro
│ │ ├── contact-us.astro
│ │ ├── category/seo.astro
│ │ └── *.astro # Service pages
│ ├── layouts/
│ │ └── Layout.astro # Main layout with header/footer
│ └── styles/
│ └── global.css # Tailwind + custom styles
├── public/
│ └── branding/ # Logo, favicons
├── Dockerfile # Multi-stage build
├── package.json
└── astro.config.mjs
```
## Docker Deployment
### Local Testing
```bash
# Build Docker image
docker build -t moreminimore-redesign:latest .
# Run locally
docker run -p 4321:4321 moreminimore-redesign:latest
# Visit: http://localhost:4321
```
### Easypanel Configuration
1. **Create Project** in Easypanel
2. **Add Git Repository**:
- Provider: Gitea
- URL: `https://gitea.moreminimore.com/moreminimore/moreminimore-redesign.git`
- Branch: `main`
3. **Docker Settings**:
- Dockerfile: `Dockerfile`
- Port: `4321`
- Command: `npx astro preview --host 0.0.0.0 --port 4321`
4. **Enable Auto-Deploy**:
- Go to Settings → Auto-deploy
- Enable: ✅
- Branch: `main`
## Manual Deployment
If auto-deploy fails:
```bash
# Push to Gitea
git add .
git commit -m "Update: [description]"
git push origin main
# Check Easypanel build logs
# Website will auto-redeploy
```
## Environment Variables
No environment variables required (static site).
## SSL/HTTPS
Easypanel automatically provisions SSL certificates via Let's Encrypt.
## Rollback
To rollback to a previous version:
1. Go to Easypanel → Deployments
2. Find the previous successful deployment
3. Click "Redeploy"
## Monitoring
- **Uptime**: Check via Easypanel dashboard
- **Logs**: Easypanel → Service → Logs
- **Build Logs**: Easypanel → Service → Deployments
## Content Updates
### Adding Blog Posts
See `CONTENT-GUIDE.md` for detailed instructions.
### Updating Pages
1. Edit the `.astro` file in `src/pages/`
2. Commit and push to `main`
3. Wait for auto-deploy (~2 minutes)
4. Verify on production
## Troubleshooting
### Build Fails
1. Check build logs in Easypanel
2. Test locally: `npm run build`
3. Fix errors and push again
### Site Not Updating
1. Check if auto-deploy is enabled
2. Verify Git webhook is working
3. Manually trigger redeploy in Easypanel
### Docker Issues
```bash
# Clear Docker cache
docker builder prune -a
# Rebuild
docker build --no-cache -t moreminimore-redesign:latest .
```
## Support
For deployment issues, contact the development team.