Files
michaelschiemer/docs/deployment/DEPLOYMENT.md
Michael Schiemer 5050c7d73a docs: consolidate documentation into organized structure
- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
2025-10-05 11:05:04 +02:00

1.7 KiB

🚀 Production Deployment Guide

Schneller Deployment-Workflow

1. Environment Setup (KRITISCH)

# Kopiere .env Template
cp .env.production .env

# Setze ALLE CHANGE_ME Werte:
nano .env

WICHTIG: Folgende Werte MÜSSEN gesetzt werden:

  • DB_PASSWORD - Starkes Datenbankpasswort
  • SHOPIFY_WEBHOOK_SECRET - Nur wenn Shopify verwendet wird
  • RAPIDMAIL_USERNAME/PASSWORD - Nur wenn RapidMail verwendet wird

2. Database Setup

# 1. Datenbank erstellen
mysql -u root -p
CREATE DATABASE production_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'production_user'@'localhost' IDENTIFIED BY 'DEIN_PASSWORT';
GRANT ALL PRIVILEGES ON production_db.* TO 'production_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

# 2. Migration ausführen
mysql -u production_user -p production_db < migrations/2024_01_01_create_meta_entries_table.sql

3. Assets Build (falls Frontend verwendet)

npm install
npm run build

4. Basic Health Check

# Server starten und testen
php -S localhost:8000 -t public/
curl http://localhost:8000/

Sicherheits-Checklist

  • Keine hardcoded Secrets im Code
  • Starke Datenbankpasswörter
  • Production .env Template erstellt
  • Environment-basierte Konfiguration

Next Steps (Optional)

  1. SSL Setup - Let's Encrypt oder eigene Zertifikate
  2. Webserver Config - nginx/Apache Konfiguration
  3. Process Manager - PM2, systemd oder supervisor
  4. Monitoring - Log-Aggregation und Error-Tracking
  5. Backup Strategy - Automatische DB-Backups

Rollback Strategy

Bei Problemen:

# 1. Alte Version aktivieren
git checkout previous-version

# 2. Assets neu bauen (falls nötig)
npm run build

# 3. Cache leeren
# (abhängig von Setup)