app/api/translate ruft DeepL für EN+PL auf und schreibt das Ergebnis in die jeweilige _en/_pl-Spalte (Staff/Admin-only, Service-Role-Key). Ohne DEEPL_API_KEY (neue Docker-Variable) antwortet die Route mit configured:false, das Frontend zeigt dann den Hinweis zur manuellen Eingabe statt eines Fehlers.
88 lines
3.2 KiB
YAML
88 lines
3.2 KiB
YAML
# =============================================================
|
||
# Canteen Menu – Docker-Setup
|
||
#
|
||
# Produktion (App + lokale PostgreSQL-Kopie):
|
||
# docker compose --env-file .env.local up -d --build
|
||
#
|
||
# Entwicklung (Dev-Server mit Hot-Reload, kein lokales Node nötig):
|
||
# docker compose --env-file .env.local --profile dev up dev
|
||
#
|
||
# Die --env-file-Angabe speist NEXT_PUBLIC_* in den Build und
|
||
# SUPABASE_SERVICE_ROLE_KEY in die Laufzeit-Umgebung.
|
||
#
|
||
# "name" fixiert den Compose-Projektnamen explizit auf "canteen-menu" –
|
||
# ohne diese Angabe leitet Compose ihn aus dem Ordnernamen ab.
|
||
# =============================================================
|
||
|
||
name: canteen-menu
|
||
|
||
services:
|
||
# ---------- Next.js-App (Produktions-Build) ----------
|
||
app:
|
||
build:
|
||
context: .
|
||
args:
|
||
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
||
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
||
image: canteen-menu-app
|
||
container_name: canteen-menu-app
|
||
environment:
|
||
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
||
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
||
SUPABASE_SERVICE_ROLE_KEY: ${SUPABASE_SERVICE_ROLE_KEY}
|
||
# Öffentliche URL der App (Domain hinter dem Reverse-Proxy).
|
||
# Wird für den CSRF-Origin-Check genutzt; dieselbe URL ist die
|
||
# Passkey-Domain (siehe scripts/configure-passkeys.mjs).
|
||
APP_URL: ${APP_URL:-http://localhost:3000}
|
||
# Titel im Browser-Tab und Überschrift, solange kein Logo hochgeladen ist.
|
||
SITE_TITLE: ${SITE_TITLE:-Canteen Menu}
|
||
# Optional: DeepL-API-Key für automatische Übersetzung von Gerichten
|
||
# (Kürzel-Erklärungen, Bereichen) nach Englisch/Polnisch. Ohne Key
|
||
# bleibt "Automatisch übersetzen" inaktiv, manuelle Eingabe geht immer.
|
||
DEEPL_API_KEY: ${DEEPL_API_KEY:-}
|
||
ports:
|
||
- "0.0.0.0:3000:3000"
|
||
restart: unless-stopped
|
||
|
||
# ---------- Lokale PostgreSQL-Kopie (Ablage/Auswertungen) ----------
|
||
# Beim ersten Start werden die Skripte aus supabase/local
|
||
# automatisch in alphabetischer Reihenfolge eingespielt.
|
||
db:
|
||
image: postgres:17-alpine
|
||
container_name: canteen-menu-db
|
||
environment:
|
||
POSTGRES_DB: canteen_menu
|
||
POSTGRES_PASSWORD: ${LOCAL_PG_PASSWORD:-canteen_menu}
|
||
ports:
|
||
# Host-Port 5433, da 5432 meist schon von einer nativen
|
||
# PostgreSQL-Installation belegt ist.
|
||
- "5433:5432"
|
||
volumes:
|
||
- pgdata:/var/lib/postgresql/data
|
||
- ./supabase/local:/docker-entrypoint-initdb.d:ro
|
||
restart: unless-stopped
|
||
|
||
# ---------- Dev-Server (nur mit --profile dev) ----------
|
||
dev:
|
||
image: node:24-alpine
|
||
container_name: canteen-menu-dev
|
||
profiles: ["dev"]
|
||
working_dir: /app
|
||
command: sh -c "npm install && npm run dev"
|
||
environment:
|
||
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
||
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
||
SUPABASE_SERVICE_ROLE_KEY: ${SUPABASE_SERVICE_ROLE_KEY}
|
||
APP_URL: ${APP_URL:-http://localhost:3000}
|
||
SITE_TITLE: ${SITE_TITLE:-Canteen Menu}
|
||
DEEPL_API_KEY: ${DEEPL_API_KEY:-}
|
||
ports:
|
||
- "0.0.0.0:3000:3000"
|
||
volumes:
|
||
- .:/app
|
||
- dev_node_modules:/app/node_modules
|
||
|
||
volumes:
|
||
pgdata:
|
||
dev_node_modules:
|