services: postgres: image: postgres:15-alpine environment: POSTGRES_DB: worldoftaxonomy POSTGRES_USER: wot POSTGRES_PASSWORD: wotpass ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U wot -d worldoftaxonomy"] interval: 5s timeout: 5s retries: 15 backend: build: context: . dockerfile: Dockerfile.backend environment: DATABASE_URL: postgresql://wot:wotpass@postgres:5432/worldoftaxonomy JWT_SECRET: change-this-in-production-must-be-32-chars-minimum ports: - "8000:8000" depends_on: postgres: condition: service_healthy volumes: # Mount data/ so downloaded source files persist across rebuilds - ./data:/app/data frontend: build: context: ./frontend dockerfile: Dockerfile environment: # Points Next.js rewrites at the backend service (not localhost) BACKEND_URL: http://backend:8000 ports: - "3000:3000" depends_on: - backend volumes: pgdata: