使用外部 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
如需有關在外部案例中設定 InfluxDB 資料庫與結構描述的資訊,請參閱將 InfluxDB 用作持續性提供者。