Files
michaelschiemer/DEPLOYMENT.md
Michael Schiemer 55a330b223 Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
2025-08-11 20:13:26 +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)