{
  "schemaVersion": 2,
  "$schema": "https://schemas.runtipi.io/dynamic-compose.json",
  "services": [
    {
      "name": "erp-integration",
      "image": "git.alexzaw.dev/alexz/erp-integration:latest",
      "isMain": true,
      "internalPort": 8001,
      "environment": [
        {
          "key": "TZ",
          "value": "${TZ}"
        },
        {
          "key": "ANTHROPIC_API_KEY",
          "value": "${ANTHROPIC_API_KEY}"
        },
        {
          "key": "ANTHROPIC_MODEL",
          "value": "${ANTHROPIC_MODEL}"
        },
        {
          "key": "AGENT_CHAT_ENABLED",
          "value": "${AGENT_CHAT_ENABLED}"
        },
        {
          "key": "CORS_ORIGIN",
          "value": "${CORS_ORIGIN}"
        },
        {
          "key": "NODE_ENV",
          "value": "production"
        },
        {
          "key": "PORT",
          "value": "8001"
        },
        {
          "key": "OLLAMA_BASE_URL",
          "value": "${OLLAMA_BASE_URL}"
        },
        {
          "key": "OLLAMA_MODEL",
          "value": "${OLLAMA_MODEL}"
        },
        {
          "key": "OLLAMA_API_KEY",
          "value": "${OLLAMA_API_KEY}"
        },
        {
          "key": "CONTEXT_ROOT",
          "value": "${CONTEXT_ROOT}"
        }
      ],
      "volumes": [
        {
          "hostPath": "${APP_DATA_DIR}/data",
          "containerPath": "/app/backend/data",
          "readOnly": false
        },
        {
          "hostPath": "${APP_DATA_DIR}/uploads",
          "containerPath": "/app/backend/uploads",
          "readOnly": false
        }
      ],
      "healthCheck": {
        "test": "curl --fail http://localhost:8001${CONTEXT_ROOT}/api/health || exit 1",
        "interval": "30s",
        "timeout": "10s",
        "retries": 3
      }
    }
  ]
}
