#!/bin/bash # Start tdengine-operator container (taosd + taosadapter) # Data directory: /mnt/tdengine-operator/data # Network: host (required for TDengine FQDN mechanism) # taosadapter runs inside this container, listening on host port 6041 # taoskeeper and taos-explorer are disabled (deployed separately) # Note: entrypoint.sh is overridden to add `-c /etc/taos/taosadapter.toml` # because the upstream image starts taosadapter without config flag. set -e CONTAINER_NAME="tdengine-operator" IMAGE="docker.io/tdengine/tdengine:3.3.6.13" DATA_DIR="/mnt/tdengine-operator/data" LOG_DIR="/mnt/tdengine-operator/log" CFG_FILE="/mnt/tdengine-operator/taos.cfg" ADAPTER_CFG="/mnt/iot-platform/config/taosadapter.toml" ENTRYPOINT_FILE="/mnt/iot-platform/config/entrypoint.sh" echo "Starting ${CONTAINER_NAME}..." # Stop and remove existing container if present podman rm -f "${CONTAINER_NAME}" 2>/dev/null || true podman run -d \ --name "${CONTAINER_NAME}" \ --network host \ --restart unless-stopped \ -e TAOS_DISABLE_KEEPER=1 \ -e TAOS_DISABLE_EXPLORER=1 \ -v "${DATA_DIR}:/var/lib/taos" \ -v "${LOG_DIR}:/var/log/taos" \ -v "${CFG_FILE}:/etc/taos/taos.cfg:ro" \ -v "${ADAPTER_CFG}:/etc/taos/taosadapter.toml:ro" \ -v "${ENTRYPOINT_FILE}:/usr/bin/entrypoint.sh:ro" \ "${IMAGE}" echo "${CONTAINER_NAME} started." echo "Ports: 6031 (taosd native), 6041 (taosadapter REST API)"