# ============================================================
# oGMemory Docker Deployment Environment Variables
# ============================================================
#
# Copy to deploy/deploy.env and fill in your values:
#   cp config/deploy.env.reference deploy/deploy.env
#
# deploy.sh sources this file before starting containers.
# ogmemory.yaml can reference these via ${VAR_NAME} syntax.
# ============================================================


# ============================================================
# Part 1: OpenClaw Gateway + Shared LLM Configuration
# ============================================================

# [Required] LLM provider
# Options: dashscope, openai, zhipu, volcengine, etc.
LLM_PROVIDER="dashscope"

# [Required] LLM API key (shared by oGMemory via ${LLM_API_KEY})
LLM_API_KEY="your-api-key"

# [Required] LLM API base URL (shared by oGMemory via ${LLM_BASE_URL})
# Examples:
#   Alibaba Cloud: https://dashscope.aliyuncs.com/compatible-mode/v1
#   VolcEngine:    https://ark.cn-beijing.volces.com/api/v3
#   OpenAI:        https://api.openai.com/v1
LLM_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"

# [Required] LLM model name (shared by oGMemory via ${LLM_MODEL})
LLM_MODEL="qwen3.6-plus-2026-04-02"

# [Optional] OpenClaw Gateway port (default: 18789)
#GATEWAY_PORT="18789"

# [Optional] OpenClaw Gateway Token (default: ogmem-default-token)
#OPENCLAW_GATEWAY_TOKEN="ogmem-default-token"

# [Optional] OpenClaw bind mode: lan / localhost (default: lan)
#OPENCLAW_BIND_MODE="lan"

# [Optional] oGMemory API URL (default: http://127.0.0.1:8090)
#OGMEM_URL="http://127.0.0.1:8090"

# [Optional] Auth API key for OpenClaw → oGMemory
# Defaults to OG_ROOT_API_KEY
#OG_AUTH_API_KEY="root-secret-key-xxxxx"

# [Optional] Auth account ID for OpenClaw
# Defaults to OG_ACCOUNT_ID
#OG_AUTH_ACCOUNT_ID="acct-company-a"

# [Optional] Multi-tenant fallback values
#OG_ROOT_API_KEY="root-secret-key-change-me"
#OG_ACCOUNT_ID="acct-demo"
#OG_USER_ID="u-alice"
#OG_AGENT_ID="main"

# [Optional] Admin API keys (comma-separated, format: account_id:key)
#OG_ADMIN_API_KEYS=""


# ============================================================
# Part 2: oGMemory Service Configuration
# ============================================================

# [Optional] AGFS data directory for persistence
AGFS_DATA_DIR="/path/to/agfs-data"


# ============================================================
# Part 3: OpenGauss Configuration
# ============================================================

# [Required] Enable OpenGauss (true/false)
ENABLE_OPENGAUSS="true"

# [Required] OpenGauss container password (set via deploy.sh -password)
# Must be 8+ chars with 3 of: uppercase, lowercase, digits, special (#?!@$%^&*)

# [Optional] OpenGauss host port (default: 15432)
OG_HOST_PORT="15432"

# [Optional] OpenGauss container port (default: 5432)
#OG_PORT="5432"

# [Optional] OpenGauss container name (default: opengauss)
#OG_CONTAINER_NAME="opengauss"

# [Optional] OpenGauss node name (default: gaussdb)
#OG_NODE_NAME="gaussdb"

# [Optional] OpenGauss username (default: gaussdb)
#OG_USERNAME="gaussdb"

# [Optional] OpenGauss database name (default: postgres)
#OG_DB_NAME="postgres"

# [Optional] OpenGauss image repo
OG_IMAGE_REPO="swr.cn-north-4.myhuaweicloud.com/kunpeng-ai/opengauss-distributed"

# [Optional] OpenGauss image tag (default: 0328)
#OG_IMAGE_TAG="0328"

# [Optional] OpenGauss CPU affinity (e.g. 0-3)
#OG_CPUSET_CPUS=""

# [Optional] OpenGauss startup timeout in seconds (default: 120)
#OG_WAIT_TIMEOUT="120"


# ============================================================
# Part 4: Container Configuration
# ============================================================

# [Required] OpenGauss host IP
OPENGAUSS_HOST_IP="127.0.0.1"

# [Required] OpenClaw host IP (use actual IP for remote access)
OPENCLAW_HOST_IP="127.0.0.1"

# [Optional] ogmemory container name (default: ogmem)
OGMEM_CONTAINER_NAME="ogmem_auto"

# [Optional] ogmemory image
OGMEM_IMAGE="ogmem:poc_419"

# [Optional] openclaw-ogmemory container name (default: openclaw_ogmem)
OPENCLAW_CONTAINER_NAME="openclaw_ogmem_auto"

# [Optional] openclaw-ogmemory image
OPENCLAW_IMAGE="ogmem-openclaw:poc_417"

# [Optional] OpenClaw state persistence directory
OPENCLAW_HOME_DIR="/path/to/openclaw-home"

# [Optional] Multi-instance deployment (format: name|port|token|auth_key|account_id|home_dir;...)
#OPENCLAW_INSTANCES=""


# ============================================================
# Part 5: Deployment Control
# ============================================================

# [Optional] Auto health check (default: true)
#AUTO_HEALTH_CHECK="true"

# [Optional] Skip image pull (default: false)
#SKIP_PULL="false"

# [Optional] Memory extraction threshold (default: 200)
#OGMEM_AFTER_TURN_THRESHOLD=200