数据解析模块
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # Start tdengine-operator container (taosd + taosadapter)
  3. # Data directory: /mnt/tdengine-operator/data
  4. # Network: host (required for TDengine FQDN mechanism)
  5. # taosadapter runs inside this container, listening on host port 6041
  6. # taoskeeper and taos-explorer are disabled (deployed separately)
  7. # Note: entrypoint.sh is overridden to add `-c /etc/taos/taosadapter.toml`
  8. # because the upstream image starts taosadapter without config flag.
  9. set -e
  10. CONTAINER_NAME="tdengine-operator"
  11. IMAGE="docker.io/tdengine/tdengine:3.3.6.13"
  12. DATA_DIR="/mnt/tdengine-operator/data"
  13. LOG_DIR="/mnt/tdengine-operator/log"
  14. CFG_FILE="/mnt/tdengine-operator/taos.cfg"
  15. ADAPTER_CFG="/mnt/iot-platform/config/taosadapter.toml"
  16. ENTRYPOINT_FILE="/mnt/iot-platform/config/entrypoint.sh"
  17. echo "Starting ${CONTAINER_NAME}..."
  18. # Stop and remove existing container if present
  19. podman rm -f "${CONTAINER_NAME}" 2>/dev/null || true
  20. podman run -d \
  21. --name "${CONTAINER_NAME}" \
  22. --network host \
  23. --restart unless-stopped \
  24. -e TAOS_DISABLE_KEEPER=1 \
  25. -e TAOS_DISABLE_EXPLORER=1 \
  26. -v "${DATA_DIR}:/var/lib/taos" \
  27. -v "${LOG_DIR}:/var/log/taos" \
  28. -v "${CFG_FILE}:/etc/taos/taos.cfg:ro" \
  29. -v "${ADAPTER_CFG}:/etc/taos/taosadapter.toml:ro" \
  30. -v "${ENTRYPOINT_FILE}:/usr/bin/entrypoint.sh:ro" \
  31. "${IMAGE}"
  32. echo "${CONTAINER_NAME} started."
  33. echo "Ports: 6031 (taosd native), 6041 (taosadapter REST API)"