diff --git a/docker-compose.yml b/docker-compose.yml index 441a337..f661327 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,15 +9,18 @@ services: ports: - "3050:3050" - # Data Privacy & Imprint Configuration - IMPRINT_URL: ${IMPRINT_URL:-} - DATA_PRIVACY_RESPONSIBLE_PERSON: ${DATA_PRIVACY_RESPONSIBLE_PERSON:-} - env_file: - .env environment: - NODE_ENV=production + # Data Privacy & Imprint Configuration + - IMPRINT_URL=${IMPRINT_URL:-} + - DATA_PRIVACY_RESPONSIBLE_PERSON=${DATA_PRIVACY_RESPONSIBLE_PERSON:-} + + volumes: + # Persist Wikipedia cache to avoid re-fetching on container restart + - wikipedia-cache:/app/public/wikipedia healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3050', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"] @@ -32,3 +35,7 @@ services: networks: chess-tutor-network: driver: bridge + +volumes: + wikipedia-cache: + driver: local diff --git a/src/app/imprint/page.tsx b/src/app/imprint/page.tsx index 97545ac..041e1b8 100644 --- a/src/app/imprint/page.tsx +++ b/src/app/imprint/page.tsx @@ -1,6 +1,9 @@ import Header from "@/components/Header"; import Footer from "@/components/Footer"; +// Force dynamic rendering to read environment variables at runtime +export const dynamic = 'force-dynamic'; + export default function ImprintPage() { return (