将外部 InfluxDB 数据库用作 ThingWorx Docker 的数据提供工具
以下是适用于 InfluxDB 的 Docker Compose 示例文件,该文件使用了外部数据库:
# This file defines service dependencies. Sometimes it is convienent to
# only start certain services so this is not part of the main compose.
version: '2.4'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8090:8090"
env_file:
- 'env.influxdb'
volumes:
# Data persistency
# sudo mkdir -p /srv/docker/influxdb/data
- /srv/docker/influxdb/data:/var/lib/influxdb
healthcheck:
test: "curl -f http://localhost:8086/ping"
interval: 3s
timeout: 10s
retries: 5