services: frontend: build: context: . dockerfile: frontend.Dockerfile environment: BACKEND_API_URL: http://backend:8000 ports: - "3000:3000" depends_on: backend: condition: service_healthy healthcheck: test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 20s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile environment: APP_ENV: development ALLOWED_ORIGINS: '["http://localhost:3000","http://127.0.0.1:3000"]' ports: - "8000:8000" healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')"] interval: 20s timeout: 5s retries: 5