Config Redis for production


I’m trying to set up Redis for production in my first Rails app. I think I’m being a bit stupid, but where do I store my private Redis URL, so that it’s not exposed?

I tried putting it in my .env file, and then defining the url like this in production.rb:

config.cache_store = :redis_cache_store, { url: ENV['REDIS_URL']

But this didn’t work. Putting the private URL directly into the config file (not good) worked for a bit, then didn’t. I have connected to the Redis that I have set up, but I’m clearly missing a few steps because my app is currently failing in production.

Many thanks

Hi. Use secrets: Secrets and Fly Apps · Fly Docs