Initial: RAPPORT-STACK — All-in-One Compose (Supabase + Website + HOST)
Ein 'docker compose up' bringt die komplette Hosting-Plattform hoch: - include ../SERVER-CONTAINER (db/auth/rest/realtime/storage/kong/app) - host-db: eigene Postgres für RAPPORT-HOST - host: Node-Backend + gebündelte Hugo-Website (Dockerfile.host, multi-stage) provisioniert Kunden-Instanzen über Kong in den Supabase-Stack Eine .env für lokal UND Hetzner (Domains/Keys per Env). host-Image baut + läuft verifiziert: Website (/,/hosting/,/login/,/admin/) + API + E2E-Flow (register→checkout→admin) aus dem Container. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# RAPPORT-STACK — Alles-in-einem: Supabase-Backend + Rapport-Frontend +
|
||||
# RAPPORT-WEBSITE (Marketing/Login) + RAPPORT-HOST (Hosting-Plattform).
|
||||
#
|
||||
# Ein Befehl bringt die komplette Hosting-Plattform hoch:
|
||||
# cp .env.example .env # Secrets setzen (siehe Kommentare dort)
|
||||
# docker compose up -d
|
||||
#
|
||||
# Läuft lokal UND auf Hetzner — Unterschiede nur über .env (Domains, Keys).
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Der komplette Supabase-Stack (db, auth, rest, realtime, storage, kong, app)
|
||||
# wird aus dem Schwester-Repo wiederverwendet — nicht dupliziert.
|
||||
include:
|
||||
- path: ../SERVER-CONTAINER/docker-compose.yml
|
||||
|
||||
services:
|
||||
# ════════════════════════════════════════════════════════════════════════
|
||||
# host-db — eigene Postgres für RAPPORT-HOST (Konten/Abos/Instanzen).
|
||||
# Bewusst GETRENNT von der Rapport-Kunden-DB (db).
|
||||
# ════════════════════════════════════════════════════════════════════════
|
||||
host-db:
|
||||
image: postgres:16-alpine
|
||||
container_name: rapport-host-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${HOST_DB_USER:-rapport_host}
|
||||
POSTGRES_PASSWORD: ${HOST_DB_PASSWORD:-rapport_host}
|
||||
POSTGRES_DB: ${HOST_DB_NAME:-rapport_host}
|
||||
volumes:
|
||||
- host-db-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "${HOST_DB_USER:-rapport_host}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
# ════════════════════════════════════════════════════════════════════════
|
||||
# host — RAPPORT-HOST Node-Backend, das ZUGLEICH die gebaute RAPPORT-WEBSITE
|
||||
# ausliefert (Marketing + Login + Konto + Admin). Provisioniert Kunden-
|
||||
# Instanzen in den Supabase-Stack über Kong.
|
||||
# ════════════════════════════════════════════════════════════════════════
|
||||
host:
|
||||
build:
|
||||
# Haupt-Kontext = RAPPORT-HOST; die Website kommt als benannter Zusatz-
|
||||
# Kontext rein (so liegen beide Repos im selben Build, ohne Duplikat).
|
||||
context: ../RAPPORT-HOST
|
||||
dockerfile: ../RAPPORT-STACK/Dockerfile.host
|
||||
additional_contexts:
|
||||
website: ../RAPPORT-WEBSITE
|
||||
container_name: rapport-host
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
host-db:
|
||||
condition: service_healthy
|
||||
kong:
|
||||
condition: service_started
|
||||
environment:
|
||||
PORT: 8787
|
||||
PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-http://localhost:8787}
|
||||
JWT_SECRET: ${HOST_JWT_SECRET}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
||||
DATABASE_URL: postgres://${HOST_DB_USER:-rapport_host}:${HOST_DB_PASSWORD:-rapport_host}@host-db:5432/${HOST_DB_NAME:-rapport_host}
|
||||
# Provisioning in den Rapport-Stack (über Kong, service_role = der Stack-Key)
|
||||
RAPPORT_API_URL: ${RAPPORT_API_URL:-http://kong:8000}
|
||||
RAPPORT_SERVICE_KEY: ${SERVICE_ROLE_KEY}
|
||||
RAPPORT_INSTANCE_URL_TEMPLATE: ${RAPPORT_INSTANCE_URL_TEMPLATE:-http://localhost:8080/?studio={slug}}
|
||||
# Stripe (optional; CHANGE-ME → MOCK-Modus)
|
||||
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-}
|
||||
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-}
|
||||
STRIPE_PRICE_SOLO: ${STRIPE_PRICE_SOLO:-}
|
||||
STRIPE_PRICE_STUDIO: ${STRIPE_PRICE_STUDIO:-}
|
||||
STRIPE_PRICE_BUSINESS: ${STRIPE_PRICE_BUSINESS:-}
|
||||
ports:
|
||||
- "${HOST_PORT:-8787}:8787"
|
||||
|
||||
volumes:
|
||||
host-db-data:
|
||||
Reference in New Issue
Block a user