Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB enviroment variables #55

Open
taserface987 opened this issue Dec 18, 2020 · 1 comment
Open

InfluxDB enviroment variables #55

taserface987 opened this issue Dec 18, 2020 · 1 comment

Comments

@taserface987
Copy link

Does this image allows creation of influxdb by using enviroment variables like described here?

version: "3.3"
 services:
  influxdb-grafana:
    image: philhawthorne/docker-influxdb-grafana:latest
    container_name: "influxdb-grafana"
    environment:
      - INFLUXDB_DB=${INFLUXDB_DB}
      - INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
      - INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
      - INFLUXDB_USER=${INFLUXDB_USER}
      - INFLUXDB_USER_PASSWORD=${INFLUXDB_USER_PASSWORD}
    restart: always
    ports:
      - 3003:3003
      - 3004:8083
      - 8086:8086
    volumes:
      - influxdb:/var/lib/influxdb
      - grafana:/var/lib/grafana

Here is part of my docker-compose file. From what I can see those variables are ignored.

@philhawthorne
Copy link
Owner

Hi @taserface987

Unfortunately not at this time. For configuration, you'll need to edit the /etc/influxdb/influxdb.conf file inside the host.

You can do this by copying the influxdb.conf file from this repo, and then mounting it as a volume like the following:

services:
  influxdb-grafana:
    image: philhawthorne/docker-influxdb-grafana:latest
    container_name: "influxdb-grafana"
    restart: always
    ports:
      - 3003:3003
      - 3004:8083
      - 8086:8086
    volumes:
      - influxdb:/var/lib/influxdb
      - grafana:/var/lib/grafana
      - /path/to/influxdb.conf:/etc/influxdb/influxdb.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants