a34d406375
- Add user contribution system (memories, timeline entries) - Add AI content moderation with Ollama (bad word detection + qwen3:4b) - Add family photo/video upload with admin approval - Add candle lighting feature - Add timeline and recipe sections - Add QR code page and OG image - Add site authentication (password-protected access) - Add proxy middleware for auth routing - Add admin dashboard for content management - Remove email fields, make name optional (default: Anonym) - Add CI/CD pipeline for Gitea Actions - Add Docker deployment configuration - Optimize Ollama RAM usage (42GB → 2.9GB) - Fix API routes accessibility through proxy middleware Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2.3 KiB
2.3 KiB
OMA Memorial - Deployment Guide
CI/CD Pipeline
Gitea Actions Workflow
Located at .gitea/workflows/deploy.yml
Triggers: Push to main branch
Steps:
- Checkout code
- Build Docker image
- Stop old container
- Run new container in
proxynetwork - Health check
- Show logs
Docker Setup
Image: Multi-stage build with Node 20 Alpine
Container name: oma-memorial
Network: proxy (no ports exposed externally)
Port: 3000 (internal only)
Requirements
-
Docker Network:
docker network create proxy -
Data Persistence:
- Volume mount:
./data:/app/data - SQLite database persists across deployments
- Volume mount:
-
Ollama (optional):
- Must be running on host or accessible
- URL:
http://localhost:11434orhttp://host.docker.internal:11434
Manual Deployment
# Build
docker build -t oma-memorial:latest .
# Run
docker run -d \
--name oma-memorial \
--network proxy \
--restart unless-stopped \
-e NODE_ENV=production \
-v $(pwd)/data:/app/data \
oma-memorial:latest
# Check logs
docker logs -f oma-memorial
# Health check
docker exec oma-memorial curl -f http://localhost:3000
Proxy Integration
The container runs in the proxy network and does not expose ports directly. Use a reverse proxy (nginx, Traefik, Caddy) to route traffic:
Example nginx config:
server {
listen 80;
server_name oma.example.com;
location / {
proxy_pass http://oma-memorial:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Example Traefik labels:
labels:
- "traefik.enable=true"
- "traefik.http.routers.oma.rule=Host(`oma.example.com`)"
- "traefik.http.services.oma.loadbalancer.server.port=3000"
Environment Variables
NODE_ENV=production(required)PORT=3000(default)ADMIN_PASSWORD(optional, defaults to hash of "Oma2024!")
Troubleshooting
Container won't start:
docker logs oma-memorial
Database issues:
# Check data volume
docker exec oma-memorial ls -la /app/data
Network not found:
docker network create proxy
Build fails:
# Clean build
docker system prune -af
docker build --no-cache -t oma-memorial:latest .