version: "3.9" services: shopbot-api: build: context: . dockerfile: Dockerfile container_name: shopbot-api ports: - "8000:8000" environment: # ── Required: Set your NVIDIA API key ────────────────────────────────── - NVIDIA_API_KEY=${NVIDIA_API_KEY} # ── PHP DB layer URL (update to your PHP server's address) ───────────── # If your PHP server runs on the host machine, use host.docker.internal # Example: http://host.docker.internal/api_ct/db_api.php - PHP_DB_URL=${PHP_DB_URL:-http://host.docker.internal/api_ct/db_api.php} # ── Internal secret shared between this API and your PHP layer ───────── - INTERNAL_SECRET=${INTERNAL_SECRET:-change_this_secret_in_production} volumes: # Persist SQL query result files outside the container - sql_results:/app/sql_results restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 start_period: 15s extra_hosts: # Allows the container to reach services on your host machine - "host.docker.internal:host-gateway" volumes: sql_results: