Files
iot-dc3/dc3/docker-compose-dev.yml
T
CopilotandClaude Opus 4.7 edaaab90de feat(config): add AUTH_HMAC_SECRET to all deployment configurations
The HMAC signing feature was dormant because no deployment config
set the shared secret. Add AUTH_HMAC_SECRET to .env.example, dev
env files, both compose stacks (all 12 services), and document it
in ENVIRONMENT.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 01:48:51 +08:00

367 lines
11 KiB
YAML

#
# Copyright 2016-present the IoT DC3 original author or authors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
x-logging: &default-logging
driver: json-file
options:
max-size: ${DC3_LOG_MAX_SIZE:-10M}
max-file: "${DC3_LOG_MAX_FILE:-20}"
services:
gateway:
build:
context: ../dc3-gateway/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-gateway:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
auth:
condition: service_healthy
manager:
condition: service_healthy
data:
condition: service_healthy
agentic:
condition: service_healthy
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_GATEWAY_PORT:-8000}:8000"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-gateway
hostname: dc3-gateway
volumes:
- logs:/dc3-gateway/dc3/logs
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8000/actuator/health/readiness >/dev/null || exit 1" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 30s
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-gateway
auth:
build:
context: ../dc3-center/dc3-center-auth/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-center-auth:${DC3_IMAGE_TAG:-2026.5}
restart: always
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_AUTH_PORT:-8300}:8300"
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_AUTH_GRPC_PORT:-9300}:9300"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-center-auth
hostname: dc3-center-auth
volumes:
- logs:/dc3-center/dc3-center-auth/dc3/logs
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8300/auth/actuator/health/readiness >/dev/null || exit 1" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 40s
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-center-auth
manager:
build:
context: ../dc3-center/dc3-center-manager/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-center-manager:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
auth:
condition: service_healthy
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_MANAGER_PORT:-8400}:8400"
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_MANAGER_GRPC_PORT:-9400}:9400"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-center-manager
hostname: dc3-center-manager
volumes:
- logs:/dc3-center/dc3-center-manager/dc3/logs
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8400/manager/actuator/health/readiness >/dev/null || exit 1" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 40s
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-center-manager
data:
build:
context: ../dc3-center/dc3-center-data/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-center-data:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
auth:
condition: service_healthy
manager:
condition: service_healthy
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_DATA_PORT:-8500}:8500"
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_DATA_GRPC_PORT:-9500}:9500"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-center-data
hostname: dc3-center-data
volumes:
- logs:/dc3-center/dc3-center-data/dc3/logs
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8500/data/actuator/health/readiness >/dev/null || exit 1" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 40s
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-center-data
agentic:
build:
context: ../dc3-center/dc3-center-agentic/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-center-agentic:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
auth:
condition: service_healthy
manager:
condition: service_healthy
data:
condition: service_healthy
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_AGENTIC_PORT:-8600}:8600"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-https://api.openai.com}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o}
- OPENAI_TEMPERATURE=${OPENAI_TEMPERATURE:-0.7}
- OPENAI_MAX_TOKENS=${OPENAI_MAX_TOKENS:-2048}
container_name: dc3-center-agentic
hostname: dc3-center-agentic
volumes:
- logs:/dc3-center/dc3-center-agentic/dc3/logs
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8600/agentic/actuator/health/readiness >/dev/null || exit 1" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 40s
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-center-agentic
listening-virtual:
build:
context: ../dc3-driver/dc3-driver-listening-virtual/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-listening-virtual:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
ports:
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_LISTENING_VIRTUAL_TCP_PORT:-6270}:6270"
- "${DC3_BIND_HOST:-127.0.0.1}:${DC3_LISTENING_VIRTUAL_UDP_PORT:-6271}:6271"
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-listening-virtual
hostname: dc3-driver-listening-virtual
volumes:
- logs:/dc3-driver/dc3-driver-listening-virtual/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-listening-virtual
modbus-tcp:
build:
context: ../dc3-driver/dc3-driver-modbus-tcp/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-modbus-tcp:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-modbus-tcp
hostname: dc3-driver-modbus-tcp
volumes:
- logs:/dc3-driver/dc3-driver-modbus-tcp/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-modbus-tcp
mqtt:
build:
context: ../dc3-driver/dc3-driver-mqtt/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-mqtt:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-mqtt
hostname: dc3-driver-mqtt
volumes:
- logs:/dc3-driver/dc3-driver-mqtt/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-mqtt
opc-da:
build:
context: ../dc3-driver/dc3-driver-opc-da/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-opc-da:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-opc-da
hostname: dc3-driver-opc-da
volumes:
- logs:/dc3-driver/dc3-driver-opc-da/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-opc-da
opc-ua:
build:
context: ../dc3-driver/dc3-driver-opc-ua/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-opc-ua:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-opc-ua
hostname: dc3-driver-opc-ua
volumes:
- logs:/dc3-driver/dc3-driver-opc-ua/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-opc-ua
plcs7:
build:
context: ../dc3-driver/dc3-driver-plcs7/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-plcs7:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-plcs7
hostname: dc3-driver-plcs7
volumes:
- logs:/dc3-driver/dc3-driver-plcs7/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-plcs7
virtual:
build:
context: ../dc3-driver/dc3-driver-virtual/
dockerfile: ./Dockerfile
image: ${DC3_IMAGE_REGISTRY:-pnoker}/dc3-driver-virtual:${DC3_IMAGE_TAG:-2026.5}
restart: always
depends_on:
manager:
condition: service_healthy
environment:
- NODE_ENV=test
- APM_AGENT_ENABLE=${APM_AGENT_ENABLE:-false}
- AUTH_HMAC_SECRET=${AUTH_HMAC_SECRET:-}
container_name: dc3-driver-virtual
hostname: dc3-driver-virtual
volumes:
- logs:/dc3-driver/dc3-driver-virtual/dc3/logs
logging: *default-logging
networks:
dc3net:
aliases:
- dc3-driver-virtual
volumes:
logs:
networks:
dc3net:
driver: bridge