# 1C Adapter Connector example environment.
# Do not put real passwords into repository files.

ONEC_ADAPTER_HOST=0.0.0.0
ONEC_ADAPTER_PORT=8011
# Required outside isolated local development. Generate a random secret and pass
# the same value to MCP/agent as ONEC_ADAPTER_TOKEN.
ONEC_ADAPTER_SERVICE_TOKEN=

# Required per-base configuration. Use password_env for each base.
# Example:
# ONEC_SQL_BASES_JSON={"upo_test":{"server":"sql-host.example.local","database":"upo_test","user":"configured_login","password_env":"ONEC_SQL_PASSWORD_UPO_TEST"}}
ONEC_SQL_BASES_JSON=
ONEC_SQL_BASES_JSON_FILE=

# Example secret referenced by ONEC_SQL_BASES_JSON password_env.
ONEC_SQL_PASSWORD_UPO_TEST=

# Protected 1C runtime bridge for Configurator-user password operations.
# Keep bridge tokens only in environment variables referenced by token_env.
# Example (test networks may explicitly opt in to HTTP):
# ONEC_INFOBASE_USER_ADMIN_BASES_JSON={"upo_test":{"url":"https://onec-runtime.example.local","token_env":"ONEC_INFOBASE_USER_ADMIN_TOKEN_UPO_TEST"}}
ONEC_INFOBASE_USER_ADMIN_BASES_JSON=
ONEC_INFOBASE_USER_ADMIN_BASES_JSON_FILE=/data/onec-infobase-user-admin.json
ONEC_INFOBASE_USER_ADMIN_TOKEN_UPO_TEST=
# Test stands only: permits password mutation calls and runtime bridge requests
# without Bearer tokens. Never enable for production or an untrusted network.
ONEC_INFOBASE_USER_ADMIN_ALLOW_UNAUTHENTICATED=false

ONEC_ADAPTER_CACHE_DB=/data/adapter-cache.sqlite
# Adapter-owned runtime state (jobs, progress, restart diagnostics). This is
# local SQLite and must not point to a 1C SQL database. Defaults to CACHE_DB.
ONEC_ADAPTER_STATE_DB=/data/adapter-cache.sqlite
# Legacy JSON job store is read once for migration only.
ONEC_ADAPTER_JOB_STORE=/data/adapter-jobs.json
ONEC_ADAPTER_BACKUP_DIR=/data/adapter-apply-backups
ONEC_ADAPTER_WRITE_LEARNING_DIR=/data/adapter-write-learning
ONEC_ADAPTER_JOB_TIMEOUT_SECONDS=240
ONEC_ADAPTER_FULL_TIMEOUT_SECONDS=600
ONEC_ADAPTER_SECTION_TIMEOUT_SECONDS=180
# Run non-stateful background calls in killable child processes.
ONEC_ADAPTER_JOB_PROCESS_ISOLATION=true
# Optional POSIX child-process limits; 0 keeps the platform/container limit.
ONEC_ADAPTER_JOB_MEMORY_LIMIT_MB=0
ONEC_ADAPTER_JOB_CPU_LIMIT_SECONDS=0
