0

I swear this is the hardest thing to find on the internet.

My Redis instance has a password. How do i configure this from an environment variable in the Rocket.toml file?

Here is what i have inside Rocket.toml. And it works perfectly if redis has no password.

[release.databases.redis]
url = "redis://redis_trending_server"

redis_trending_server here is my redis server given from docker-compose file. This works. But now I have set a redis password. I have also passed this password in an environment variable to Rust ${MY_REDIS_PASSWORD}

Now inside the Rocket.toml file how do i first

  1. Grab that environment variable

and then

  1. configure that password in the url above?

I cant find a single documentation any where on this -__-

Just a coder
  • 15,480
  • 16
  • 85
  • 138

0 Answers0