Files
Speisekarte/docker-compose.yml
T
florian.wilde 0dbf89dfa2 Erreichbarkeit auf 0.0.0.0; Projekt zu "canteen-menu" umbenannt
- next dev/start binden jetzt explizit an 0.0.0.0 statt nur localhost
  (Docker war über die Port-Freigabe bereits erreichbar, jetzt auch
  beim nativen npm-Betrieb); docker-compose.yml macht das Binden an
  alle Interfaces zusätzlich explizit
- package.json-Name, Docker-Image/Container/Netzwerk-Namen, lokaler
  DB-Name (canteen_menu), Browser-Tab-Titel und README auf den
  englischen Projektnamen "canteen-menu" umgestellt; deutsche
  In-App-Texte für die Kantinen-Mitarbeiter bleiben unverändert
- Supabase-Projekt (Anzeigename) und native lokale Postgres-DB
  entsprechend umbenannt (Ref/URL/Keys unverändert)
2026-07-17 20:07:53 +02:00

75 lines
2.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================
# 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}
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}
ports:
- "0.0.0.0:3000:3000"
volumes:
- .:/app
- dev_node_modules:/app/node_modules
volumes:
pgdata:
dev_node_modules: