Umstellung auf Next.js (App Router), Design analog werte-next
Führt das getrennte React/Vite-Frontend und Express/MongoDB-Backend in eine einzelne Next.js-Anwendung zusammen: - UI: React-Client-Komponenten (TabLayout, AppointmentForm, -List, ConfirmationModal) im Look von werte-next (Farben #CCCCFF/#85B7D7/ #FFFFDD, Rahmenbox, Tabellen-Liste, Footer mit Version/Datum) - API: Next.js Route Handler unter /api/appointments (GET/POST/PUT/DELETE, Soft-Delete beibehalten) - DB: MongoDB via lib/db.ts (gecachter Client, Standard appointmentsdb) - Tailwind 4 + TypeScript, Standalone-Docker-Build wie werte-next - Druckansicht der aktuellen offenen Termine beibehalten - Deployment: Dockerfile (multi-stage), docker-compose(.prod), deploy.sh Entfernt die alten frontend/- und backend/-Verzeichnisse. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-30
@@ -1,8 +1,8 @@
|
||||
# Produktions-Setup für den Serverbetrieb.
|
||||
# Starten mit: docker compose -f docker-compose.prod.yml up -d --build
|
||||
# Produktions-Setup für den Serverbetrieb: Next.js-App + MongoDB
|
||||
# Starten mit: docker compose -f docker-compose.prod.yml up -d
|
||||
#
|
||||
# Benötigt eine .env-Datei (siehe .env.example) mit:
|
||||
# MONGO_ROOT_USER, MONGO_ROOT_PASSWD und optional FRONTEND_PORT.
|
||||
# Benötigt eine .env-Datei (siehe .env.example) mit
|
||||
# MONGO_ROOT_USER, MONGO_ROOT_PASSWD und optional APP_PORT.
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
@@ -19,35 +19,17 @@ services:
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile.prod
|
||||
container_name: backend
|
||||
restart: unless-stopped
|
||||
# Kein Host-Port: Das Backend wird nur intern über nginx (Frontend) angesprochen
|
||||
environment:
|
||||
- PORT=3001
|
||||
- NODE_ENV=production
|
||||
- MONGO_URI=mongodb://${MONGO_ROOT_USER}:${MONGO_ROOT_PASSWD}@mongodb:27017/appointmentsdb?authSource=admin
|
||||
# Frontend läuft über denselben Host (nginx-Proxy) -> kein Cross-Origin nötig.
|
||||
# Bei Bedarf hier die öffentliche Frontend-URL eintragen.
|
||||
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:5173}
|
||||
depends_on:
|
||||
- mongodb
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile.prod
|
||||
container_name: frontend
|
||||
app:
|
||||
image: docker.citysensor.de/aerzte-next:latest
|
||||
container_name: aerzte-app
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${FRONTEND_PORT:-80}:80"
|
||||
- "${APP_PORT:-3000}:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- MONGO_URI=mongodb://${MONGO_ROOT_USER}:${MONGO_ROOT_PASSWD}@mongodb:27017/appointmentsdb?authSource=admin
|
||||
depends_on:
|
||||
- backend
|
||||
- mongodb
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
Reference in New Issue
Block a user