Home > other >  How do I change Grafana docker container environment variables on AWS Fargate to use a mysql databas
How do I change Grafana docker container environment variables on AWS Fargate to use a mysql databas

Time:06-07

How do I change Grafana Docker container environment variables on AWS Fargate to use a mysql database? I am very new to AWS and containers. Is it through the cmd line? When I type "docker ps -a" my containers do not show up. I've tried looking through the Grafana documentation but I think that's if you are running the containers locally. Would it be the same for AWS? I've looked into SSHing into the containers, but that requires me to alter the task definition in Terraform.

CodePudding user response:

You need to define correct variables in the ECS task definition, e.g.:

GF_DATABASE_TYPE: mysql
GF_DATABASE_HOST: my-mysql:3306
GF_DATABASE_USER: my-user
GF_DATABASE_PASSWORD: my-password

Of course you may need to more if you have specific DB configuration. All options are documented: https://grafana.com/docs/grafana/latest/administration/configuration/#database

  • Related