version: '3.8' services: backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: - HF_TOKEN=${HF_TOKEN:-} volumes: # Mount DB for persistence (in production use a volume, here bind-mount is okay for dev) - backend_data:/app frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: # Next.js will build this at build-time, but here it is for client-side API requests - NEXT_PUBLIC_API_URL=http://localhost:8000 depends_on: - backend volumes: backend_data: