安装和配置 > 使用 ThingWorx Docker > 将外部 InfluxDB 数据库用作 ThingWorx Docker 的数据提供工具
将外部 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 作为持久化方案提供工具
有关 InfluxDB 官方映像的详细信息,请访问 https://hub.docker.com/_/influxdb