6.4 KiB
6.4 KiB
🚀 Deployment Checklist für QR Master
Diese Checkliste enthält alle notwendigen Änderungen vor dem Push nach Gitea und dem Production Deployment.
✅ 1. Environment Variables (.env)
Basis URLs ändern
# Von:
NEXT_PUBLIC_APP_URL=http://localhost:3050
NEXTAUTH_URL=http://localhost:3050
# Zu:
NEXT_PUBLIC_APP_URL=https://www.qrmaster.net
NEXTAUTH_URL=https://www.qrmaster.net
Secrets generieren (falls noch nicht geschehen)
# NEXTAUTH_SECRET (für JWT/Session Encryption)
openssl rand -base64 32
# IP_SALT (für DSGVO-konforme IP-Hashing)
openssl rand -base64 32
Bereits generiert:
- ✅ NEXTAUTH_SECRET:
PT8XVydC4v7QluCz/mV1yb7Y3docSFZeFDioJz4ZE98= - ✅ IP_SALT:
j/aluIpzsgn5Z6cbF4conM6ApK5cj4jDagkswzfgQPc=
Database URLs
# Development (localhost):
DATABASE_URL="postgresql://postgres:postgres@localhost:5435/qrmaster?schema=public"
DIRECT_URL="postgresql://postgres:postgres@localhost:5435/qrmaster?schema=public"
# Production (anpassen an deinen Server):
DATABASE_URL="postgresql://USER:PASSWORD@HOST:5432/qrmaster?schema=public"
DIRECT_URL="postgresql://USER:PASSWORD@HOST:5432/qrmaster?schema=public"
🔐 2. Google OAuth Configuration
Redirect URIs in Google Cloud Console hinzufügen
- Gehe zu: https://console.cloud.google.com/apis/credentials
- Wähle deine OAuth 2.0 Client ID:
683784117141-ci1d928jo8f9g6i1isrveflmrinp92l4.apps.googleusercontent.com - Füge folgende Authorized redirect URIs hinzu:
https://www.qrmaster.net/api/auth/callback/google
Optional (für Staging/Testing):
http://localhost:3050/api/auth/callback/google
https://staging.qrmaster.net/api/auth/callback/google
💳 3. Stripe Configuration
⚠️ WICHTIG: Von Test Mode zu Live Mode wechseln
Current (Test Mode):
STRIPE_SECRET_KEY=sk_test_51QYL7gP9xM...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51QYL7gP9xM...
Production (Live Mode):
- Gehe zu: https://dashboard.stripe.com/
- Wechsle von Test Mode zu Live Mode (Toggle oben rechts)
- Hole dir die Live Keys:
API Keys→Secret key(beginnt mitsk_live_)API Keys→Publishable key(beginnt mitpk_live_)
# Production Keys:
STRIPE_SECRET_KEY=sk_live_XXXXX
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_XXXXX
Webhook Secret (Production)
- Erstelle einen neuen Webhook Endpoint: https://dashboard.stripe.com/webhooks
- Endpoint URL:
https://www.qrmaster.net/api/webhooks/stripe - Events to listen:
checkout.session.completedcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
- Kopiere den Signing Secret (beginnt mit
whsec_)
STRIPE_WEBHOOK_SECRET=whsec_XXXXX
Price IDs aktualisieren
Erstelle Produkte und Preise in Live Mode:
- https://dashboard.stripe.com/products
- Erstelle "Pro" und "Business" Pläne
- Kopiere die Price IDs (beginnen mit
price_)
STRIPE_PRICE_ID_PRO_MONTHLY=price_XXXXX
STRIPE_PRICE_ID_PRO_YEARLY=price_XXXXX
STRIPE_PRICE_ID_BUSINESS_MONTHLY=price_XXXXX
STRIPE_PRICE_ID_BUSINESS_YEARLY=price_XXXXX
📧 4. Resend Email Configuration
Domain Verification
- Gehe zu: https://resend.com/domains
- Füge Domain hinzu:
qrmaster.net - Konfiguriere DNS Records (SPF, DKIM, DMARC)
- Warte auf Verification
From Email anpassen
Aktuell verwendet alle Emails: onboarding@resend.dev (Resend's Test Domain)
Nach Domain Verification in src/lib/email.ts ändern:
// Von:
from: 'Timo from QR Master <onboarding@resend.dev>',
// Zu:
from: 'Timo from QR Master <hello@qrmaster.net>',
// oder
from: 'Timo from QR Master <noreply@qrmaster.net>',
🔍 5. SEO Configuration
Bereits korrekt konfiguriert ✅
NEXT_PUBLIC_INDEXABLE=true # ✅ Bereits gesetzt
Sitemap & robots.txt prüfen
- Sitemap:
https://www.qrmaster.net/sitemap.xml - Robots:
https://www.qrmaster.net/robots.txt
Nach Deployment testen!
📊 6. PostHog Analytics (Optional)
Falls du PostHog nutzt:
NEXT_PUBLIC_POSTHOG_KEY=phc_XXXXX
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
🐳 7. Docker Deployment
docker-compose.yml prüfen
Stelle sicher, dass alle ENV Variables korrekt gemappt sind:
environment:
NEXTAUTH_URL: https://www.qrmaster.net
NEXT_PUBLIC_APP_URL: https://www.qrmaster.net
# ... weitere vars
Deployment Commands
# Build & Deploy
docker-compose up -d --build
# Database Migration (nach erstem Deploy)
docker-compose exec web npm run db:migrate
# Logs checken
docker-compose logs -f web
# Health Check
curl https://www.qrmaster.net
🔒 8. Security Checklist
- ✅ NEXTAUTH_SECRET ist gesetzt und sicher (32+ Zeichen)
- ✅ IP_SALT ist gesetzt und sicher
- ⚠️ Stripe ist auf Live Mode umgestellt
- ⚠️ Google OAuth Redirect URIs enthalten Production URL
- ⚠️ Resend Domain ist verifiziert
- ⚠️ Webhook Secrets sind für Production gesetzt
- ⚠️ Database URLs zeigen auf Production DB
- ⚠️ Keine Test/Dev Secrets in Production
📝 9. Vor dem Git Push
Files prüfen
# .env sollte NICHT committet werden!
git status
# Falls .env in Git ist:
git rm --cached .env
echo ".env" >> .gitignore
Sensible Daten entfernen
- Keine API Keys im Code
- Keine Secrets in Config Files
.envist in.gitignore
🎯 10. Nach dem Deployment testen
Funktionen testen
- Google OAuth Login: https://www.qrmaster.net/login
- QR Code erstellen: https://www.qrmaster.net/create
- Stripe Checkout: Testprodukt kaufen mit echten Stripe Test Cards
- Email Delivery: Password Reset testen
- Analytics: PostHog Events tracken
Monitoring
# Server Logs
docker-compose logs -f
# Database Status
docker-compose exec db psql -U postgres -d qrmaster -c "SELECT COUNT(*) FROM \"User\";"
# Redis Status
docker-compose exec redis redis-cli PING
📞 Support Kontakte
- Stripe Support: https://support.stripe.com
- Google Cloud Support: https://support.google.com/cloud
- Resend Support: https://resend.com/docs
- Next.js Docs: https://nextjs.org/docs
✨ Deployment erfolgreich!
Nach erfolgreichem Deployment:
- ✅ Teste alle wichtigen Features
- ✅ Monitor Logs für Fehler
- ✅ Prüfe Analytics Dashboard
- ✅ Backup der Production Database erstellen
Good luck! 🚀