| 123456789101112131415161718192021222324252627282930 |
- #!/bin/bash
- # Start taosAdapter as independent container
- # Provides REST API (port 6041) for Node.js service and third-party tools
- # Connects to tdengine-operator (host network, port 6031)
-
- set -e
-
- CONTAINER_NAME="taosadapter"
- IMAGE="docker.io/tdengine/tdengine:3.3.6.13"
- CFG_FILE="/mnt/iot-platform/config/taosadapter.toml"
- TAOS_CFG="/mnt/tdengine-operator/taos.cfg"
-
- 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 bridge \
- --restart unless-stopped \
- -p 6041:6041 \
- -v "${CFG_FILE}:/etc/taos/taosadapter.toml:ro" \
- -v "${TAOS_CFG}:/etc/taos/taos.cfg:ro" \
- "${IMAGE}" \
- taosadapter -c /etc/taos/taosadapter.toml
-
- echo "${CONTAINER_NAME} started."
- echo "Port: 6041 (REST API)"
- echo "Connects to taosd at 172.21.185.173:6031 via taos.cfg"
|