From 208dfdb7fa7b188e49b18d61b84729ff9523dbed Mon Sep 17 00:00:00 2001 From: sepehr Date: Sun, 11 Jan 2026 23:02:11 +0100 Subject: [PATCH] docs: Update README with Docker deployment info --- README.md | 128 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c8de230..01dc4b1 100644 --- a/README.md +++ b/README.md @@ -244,21 +244,125 @@ DATABASE_URL="file:./dev.db" ## 🚀 Deployment -### Vercel (Recommended) +### 🐳 Docker Deployment (Recommended for Proxmox) + +Keep Notes includes complete Docker configuration for easy deployment on Proxmox or any Docker host. + +#### Quick Start + ```bash -npm run build -# Deploy to Vercel +cd keep-notes + +# Create environment file +cat > .env << EOF +NEXTAUTH_URL=http://localhost:3000 +NEXTAUTH_SECRET=$(openssl rand -base64 32) +EOF + +# Build and start +docker-compose build +docker-compose up -d + +# Access at http://localhost:3000 ``` -### Docker -```dockerfile -FROM node:20-alpine -WORKDIR /app -COPY . . -RUN npm install -RUN npx prisma generate -RUN npm run build -CMD ["npm", "start"] +#### Deployment Script + +We provide an automation script for common tasks: + +```bash +chmod +x deploy.sh + +# Build image +./deploy.sh build + +# Start containers +./deploy.sh start + +# View logs +./deploy.sh logs + +# Backup database +./deploy.sh backup + +# Update application +./deploy.sh update +``` + +#### Features + +- ✅ **Multi-stage Docker build** for optimized image size +- ✅ **Persistent volumes** for database and uploads +- ✅ **Health checks** for automatic restart +- ✅ **Resource limits** for stable performance +- ✅ **Ollama support** for local AI models (optional) +- ✅ **Nginx reverse proxy** configuration included +- ✅ **Automated backups** with cron scripts + +#### Architecture + +``` +keep-notes/ +├── Dockerfile # Multi-stage build +├── docker-compose.yml # Container orchestration +├── .dockerignore # Build optimization +├── deploy.sh # Deployment automation +└── DOCKER_DEPLOYMENT.md # Complete guide +``` + +#### Supported Platforms + +- **Proxmox VE** (LXC containers or VMs) +- **Docker hosts** (Linux, Windows, macOS) +- **Cloud providers** (AWS, GCP, Azure) +- **Kubernetes** (via Docker Compose) + +#### AI Features Setup + +**Option 1: OpenAI (Cloud)** +```yaml +# In .env or docker-compose.yml +OPENAI_API_KEY=sk-your-key-here +``` + +**Option 2: Ollama (Local AI)** +```bash +# Uncomment ollama service in docker-compose.yml +./deploy.sh start +./deploy.sh ollama-pull granite4 +``` + +#### Documentation + +See [DOCKER_DEPLOYMENT.md](keep-notes/DOCKER_DEPLOYMENT.md) for: +- Complete Proxmox deployment guide +- SSL/HTTPS configuration with Let's Encrypt +- Database backup and restore procedures +- Performance tuning and resource recommendations +- Troubleshooting common issues +- Security best practices + +### ☁️ Vercel (Alternative) + +For serverless deployment: + +```bash +cd keep-notes +npm run build +vercel deploy +``` + +### 📦 Traditional Deployment + +For traditional VPS or bare metal: + +```bash +cd keep-notes +npm install +npx prisma generate +npx prisma migrate deploy +npm run build +npm start ``` ## 📝 Development Notes