Files
Rezepte/SERVER_DEPLOYMENT_PACKAGE.md
2025-09-22 16:35:59 +02:00

67 lines
2.0 KiB
Markdown

# Server Deployment Package
#
# This directory contains the minimal files needed for server deployment
# when using pre-built Docker images from a registry.
## Required Files on Server:
### 1. Docker Compose File
- `docker-compose.registry.yml` - Uses pre-built images instead of building from source
### 2. Environment Configuration
- `.env.production` - Production configuration (copy from .env.registry.example)
### 3. Database Initialization
- `Rezepte.sql` - Main recipes table
- `ingredients.sql` - Ingredients data
- `Zubereitung.sql` - Preparation steps
- `rezepte_bilder.sql` - Recipe images metadata
### 4. Deployment Script
- `deploy-registry.sh` - Automated deployment from registry
## Server Setup:
```bash
# 1. Create deployment directory
mkdir -p /opt/rezepte-klaus
cd /opt/rezepte-klaus
# 2. Copy required files to server
scp docker-compose.registry.yml user@server:/opt/rezepte-klaus/
scp .env.production user@server:/opt/rezepte-klaus/
scp *.sql user@server:/opt/rezepte-klaus/
scp deploy-registry.sh user@server:/opt/rezepte-klaus/
# 3. Make deployment script executable
chmod +x deploy-registry.sh
# 4. Deploy
./deploy-registry.sh
```
## Benefits:
**Minimal Server Footprint**: Only config files, no source code
**Fast Deployment**: No building, just image pulling
**Version Control**: Tagged images for different versions
**Security**: No source code exposure on production server
**Rollback**: Easy version switching
**Multi-Server**: Same images across environments
## File Sizes:
- docker-compose.registry.yml: ~2 KB
- .env.production: ~1 KB
- *.sql files: ~50 KB total
- deploy-registry.sh: ~3 KB
- **Total: ~56 KB** (vs. entire repository ~10+ MB)
## Registry Options:
1. **GitHub Container Registry** (ghcr.io) - Free for public repos
2. **Docker Hub** - Free tier available
3. **AWS ECR** - Private registry, pay-per-use
4. **Azure Container Registry** - Private registry
5. **Google Container Registry** - Private registry
The deployment package is ~1000x smaller than cloning the full repository!