this is my docker-compose file based on the example - do I need to change the environmental variables or can I use these as they are for testing purposes?
version: '3'
services:
influxdb:
image: influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- /home/svl/influxdb2:/var/lib/influxdb2:rw
ports:
- "8086:8086"
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
links:
- influxdb
image: influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- /home/svl/influxdb2:/var/lib/influxdb2:rw
- ./ssl/influxdb-selfsigned.crt:/etc/ssl/influxdb-selfsigned.crt:rw
- ./ssl/influxdb-selfsigned.key:/etc/ssl/influxdb-selfsigned.key:rw
environment:
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=myusername
- DOCKER_INFLUXDB_INIT_PASSWORD=passwordpasswordpassword
- DOCKER_INFLUXDB_INIT_ORG=myorg
- DOCKER_INFLUXDB_INIT_BUCKET=mybucket
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken
- INFLUXD_TLS_CERT=/etc/ssl/influxdb-selfsigned.crt
- INFLUXD_TLS_KEY=/etc/ssl/influxdb-selfsigned.key
entrypoint: ["./entrypoint.sh"]
restart: on-failure:10
depends_on:
- influxdb
telegraf:
image: telegraf
links:
- influxdb
volumes:
# Mount for telegraf config
- ./telegraf/mytelegraf.conf:/etc/telegraf/telegraf.conf
env_file:
- ./influxv2.env
environment:
- DOCKER_INFLUXDB_INIT_ORG=myorg
- DOCKER_INFLUXDB_INIT_BUCKET=mybucket
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken
depends_on:
- influxdb_cli
volumes:
influxdb2:
Should a docker-compose file just work out of the box like this?