Files
iot-dc3/.env.example
T
pnoker 11640cf6ac build: deploy dc3-db artifacts and document store selection env
- include dc3-db in the make deploy artifact set alongside common/mq/tsdb
- sample DC3_DB_TYPE/DC3_TSDB_TYPE and external-store ports in .env.example
- expose mysql/mariadb/tdengine/influxdb/iotdb/jaeger in the compose stacks
- update AGENTS.md module map and module-ownership guidance
- add the missing AGPL header to the oracle driver service
2026-08-25 19:27:57 +08:00

168 lines
5.6 KiB
Bash

# Docker Compose interpolation defaults for the stacks under dc3/.
# Run compose commands from the repository root so this file is loaded automatically.
# Variables under "Local source-run defaults" mirror dc3/env/dev.env(.sh).
# Compose only injects variables that are explicitly referenced by a compose file.
# Shared image / logging defaults
# Makefile registry selector. Set REGISTRY=cn here once instead of passing it to every make command.
REGISTRY=auto
DC3_IMAGE_REGISTRY=pnoker
DC3_IMAGE_TAG=2026.6
DC3_LOG_MAX_SIZE=10M
DC3_LOG_MAX_FILE=20
DC3_BIND_HOST=127.0.0.1
APM_AGENT_ENABLE=false
# Auth token signing key and HMAC shared secret for X-Auth-User header signing between gateway and backend services
DC3_SECURITY_KEY=dc3.security.key.2026.io.github.pnoker
AUTH_HMAC_SECRET=io.github.pnoker.dc3
# Base dependency stack / local database defaults
POSTGRES_HOST=localhost
POSTGRES_PORT=35432
POSTGRES_USERNAME=dc3
POSTGRES_PASSWORD=dc3dc3dc3
POSTGRES_DB=dc3
DC3_POSTGRES_PORT=35432
DC3_RABBITMQ_TLS_PORT=35671
DC3_RABBITMQ_PORT=35672
DC3_RABBITMQ_MANAGEMENT_PORT=15672
# Message broker selection for the internal async plane (docs/mq-brokers.md).
# One of: rabbitmq (default) | kafka | rocketmq | pulsar | activemq | mqtt
DC3_MQ_TYPE=rabbitmq
# Connection settings for non-rabbitmq selections (only read when DC3_MQ_TYPE matches)
DC3_MQ_KAFKA_BOOTSTRAP=kafka:9092
DC3_MQ_ROCKETMQ_NAMESRV=rocketmq-namesrv:9876
DC3_MQ_PULSAR_URL=pulsar://pulsar:6650
DC3_MQ_ACTIVEMQ_URL=tcp://activemq:61616
DC3_MQ_MQTT_HOST=dc3-rabbitmq
DC3_MQ_MQTT_PORT=1883
# Relational dialect selection (docs/db-dialects.md); postgres is the default.
# One of: postgres (default) | mysql | mariadb
DC3_DB_TYPE=postgres
# Cross-engine URL overrides (DC3_DB_URL / DC3_DB_HISTORY_URL) are PER SERVICE —
# each center owns its own database: auth -> .../dc3_auth, data -> .../dc3_data
# (+ DC3_DB_HISTORY_URL), manager -> .../dc3_manager, agentic -> .../dc3_agentic.
# Source runs: export them per service. Containers: per-service environment
# entries via docker-compose.override.yml — a single shared value would point
# every center at one database (recipe in docs/db-dialects.md).
# Time-series store selection (docs/tsdb-stores.md); timescale is the default.
# One of: timescale (default) | tdengine | influxdb | iotdb
DC3_TSDB_TYPE=timescale
# Non-timescale adapter connection settings (only read when DC3_TSDB_TYPE matches)
DC3_TSDB_TDENGINE_URL=jdbc:TAOS-RS://localhost:6041/
DC3_TSDB_INFLUXDB_URL=http://localhost:8181
DC3_TSDB_INFLUXDB_TOKEN=
DC3_TSDB_IOTDB_HOST=localhost
DC3_TSDB_IOTDB_PORT=6667
# Local RabbitMQ defaults
RABBITMQ_VIRTUAL_HOST=dc3
RABBITMQ_HOST=localhost
RABBITMQ_PORT=35672
RABBITMQ_USERNAME=dc3
RABBITMQ_PASSWORD=dc3dc3dc3
RABBITMQ_MQTT_EXCHANGE=dc3.e.mqtt
# Internal app-to-RabbitMQ port. Use 5671 with RABBITMQ_SSL_ENABLED=true.
RABBITMQ_CONTAINER_PORT=5672
RABBITMQ_SSL_ENABLED=false
RABBITMQ_SSL_ALGORITHM=TLS
RABBITMQ_SSL_VALIDATE_SERVER_CERTIFICATE=false
RABBITMQ_SSL_VERIFY_HOSTNAME=false
# Application stack published ports
DC3_GATEWAY_PORT=8000
DC3_AUTH_PORT=8300
DC3_AUTH_GRPC_PORT=9300
DC3_MANAGER_PORT=8400
DC3_MANAGER_GRPC_PORT=9400
DC3_DATA_PORT=8500
DC3_DATA_GRPC_PORT=9500
DC3_AGENTIC_PORT=8600
DC3_LISTENING_VIRTUAL_TCP_PORT=6270
DC3_LISTENING_VIRTUAL_UDP_PORT=6271
# Local source-run defaults
NODE_ENV=dev
DC3_FACADE_MODE=grpc
DC3_FACADE_GRPC_DEADLINE_MS=3000
CENTER_AUTH_HOST=localhost
CENTER_MANAGER_HOST=localhost
CENTER_DATA_HOST=localhost
CENTER_AGENTIC_HOST=localhost
# Agentic / OpenAI-compatible API defaults
AGENTIC_FALLBACK_OPENAI_BASE_URL=https://api.openai.com
AGENTIC_FALLBACK_OPENAI_API_KEY=
AGENTIC_FALLBACK_OPENAI_MODEL=gpt-4o
AGENTIC_FALLBACK_OPENAI_TEMPERATURE=0.7
AGENTIC_FALLBACK_OPENAI_MAX_TOKENS=2048
AGENTIC_MEMORY_SCHEMA_INIT=never
AGENTIC_MEMORY_ENABLED=false
AGENTIC_TOOL_CALLING_ENABLED=true
AGENTIC_MEMORY_MAX_MESSAGES=50
AGENTIC_ATTACHMENT_STORAGE_PATH=dc3/data/agentic/attachments
# Local MQTT defaults
MQTT_BROKER_HOST=localhost
MQTT_BROKER_PORT=31883
MQTT_USERNAME=dc3
MQTT_PASSWORD=dc3dc3dc3
MQTT_BATCH_SPEED=100
MQTT_BATCH_INTERVAL=5
# Point processing defaults
POINT_BATCH_SIZE=500
POINT_BATCH_RECEIVE_TIMEOUT_MILLIS=100
POINT_CONCURRENT_CONSUMERS=4
POINT_MAX_CONCURRENT_CONSUMERS=16
POINT_PREFETCH_COUNT=1000
POINT_RETRY_MAX_RETRIES=3
POINT_RETRY_INITIAL_INTERVAL_MILLIS=1000
POINT_RETRY_MULTIPLIER=2
POINT_RETRY_MAX_INTERVAL_MILLIS=10000
# Distributed driver runtime lease (PostgreSQL-backed, no Redis)
DC3_DRIVER_LEASE_SECONDS=30
DC3_DRIVER_LEASE_RENEW_CRON=0/10 * * * * ?
DC3_DRIVER_LEASE_QUEUE_EXPIRES_MILLIS=300000
# Optional EMQX stack published ports
DC3_EMQX_WS_PORT=38083
DC3_EMQX_WSS_PORT=38084
DC3_EMQX_MQTT_PORT=31883
DC3_EMQX_MQTTS_PORT=38883
DC3_EMQX_DASHBOARD_PORT=18083
# Observability stack
GF_SERVER_ROOT_URL=http://localhost:3000
DC3_GRAFANA_PORT=3000
DC3_KIBANA_PORT=5601
DC3_ES_JAVA_OPTS=-Xms512m -Xmx512m
DC3_LS_JAVA_OPTS=-Xms256m -Xmx256m
# Optional external-store published ports (docker-compose-optional.yml)
DC3_TDENGINE_PORT=36041
DC3_INFLUXDB_PORT=38181
DC3_MYSQL_PORT=33306
DC3_MARIADB_PORT=33307
DC3_IOTDB_PORT=36667
DC3_JAEGER_UI_PORT=16686
DC3_JAEGER_OTLP_GRPC_PORT=4317
# Per-process overrides. Uncomment only for a single service process/container;
# these variables are intentionally not shared defaults across all services.
# TCP_PORT=6270
# UDP_PORT=6271
# POSTGRES_SCHEMA=dc3_manager
# Gateway route overrides. Usually CENTER_*_HOST is enough for local runs.
# GATEWAY_ROUTE_AUTH_TOKEN_URI=http://localhost:8300/
# GATEWAY_ROUTE_AUTH_URI=http://localhost:8300
# GATEWAY_ROUTE_MANAGER_URI=http://localhost:8400
# GATEWAY_ROUTE_DATA_URI=http://localhost:8500
# GATEWAY_ROUTE_AGENTIC_URI=http://localhost:8600