- Migrate from vanilla JavaScript SPA to Next.js 16 with App Router - Add server-side rendering for all pages (Home, Compare, Rankings) - Create individual school pages with dynamic routing (/school/[urn]) - Implement Chart.js and Leaflet map integrations - Add comprehensive SEO with sitemap, robots.txt, and JSON-LD - Set up Docker multi-service architecture (PostgreSQL, FastAPI, Next.js) - Update CI/CD pipeline to build both backend and frontend images - Fix Dockerfile to include devDependencies for TypeScript compilation - Add Jest testing configuration - Implement performance optimizations (code splitting, caching) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
42 lines
1016 B
YAML
42 lines
1016 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
nextjs:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: schoolcompare-nextjs
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://backend:8000/api}
|
|
- FASTAPI_URL=${FASTAPI_URL:-http://backend:8000/api}
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- schoolcompare-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
backend:
|
|
image: schoolcompare-backend:latest
|
|
container_name: schoolcompare-backend
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
- PYTHONUNBUFFERED=1
|
|
networks:
|
|
- schoolcompare-network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
schoolcompare-network:
|
|
driver: bridge
|