services: api: build: context: . dockerfile: Dockerfile image: fraud-detection-api:latest container_name: fraud-detection-api restart: unless-stopped ports: - "8000:8000" environment: - PYTHONUNBUFFERED=1 healthcheck: test: ["CMD", "python", "-c", "import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8000/health'); sys.exit(0)"] interval: 30s timeout: 5s retries: 3 start_period: 20s