version: "3.9" services: cml-api: build: context: . dockerfile: Dockerfile target: runtime ports: - "8080:8080" environment: PORT: "8080" CML_STORE_PATH: /data/cml.db CML_RATE_LIMIT_ENABLED: "true" # CML_API_TOKEN: optional — uncomment to enable Bearer auth # CML_CORS_ORIGINS: "*" volumes: - cml-data:/data healthcheck: test: ["CMD-SHELL", "python -c \"import urllib.request,os,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:'+os.environ.get('PORT','8080')+'/health',timeout=2).status==200 else 1)\""] interval: 10s timeout: 3s retries: 3 start_period: 5s restart: unless-stopped volumes: cml-data: driver: local