How to use redis on digital ocean app platform for wave.
Basically on local I installed the redis on pc and localhost worked absolutely fine. But one deployment on digital ocean machine its not accessible. There is an option to add redis DB entirely but the env variable setup does not match that. Is there any guide or am I missing something?
Hi there,
I think that you should just be able to define the env variables as normal.
According to the App Platform docs, the REDIS_URL env variable is available as well:
${_self.REDIS_URL}: The Redis connection string
It should be set to something like this:
REDIS_HOST=tls://your_redis_host.db.ondigitalocean.com
You will also have to define the port, username and the password as well as per the Laravel documentation:
REDIS_USERNAME
REDIS_PASSWORD
REDIS_PORT
I've used the DigitalOcean managed Redis clusters with the App Platform in the past so it should work once the env vars are defined. Let me know how it goes!
















Hey, Thanks Man! for your prompt and detailed response. Actually to test the changes locally in my PC before pushing to production, I made some changes in config>database.php file due to that the HOST name variable was making URL look like tcp://tls://, also i did not knew that Digital Ocean is using tls for its redis cluster. So, I used REDIS_URL method from the docs you mentioned and now its working like a charm! 😊
Hey!
No worries at all! Happy to help and happy to hear that it is all working now.
Good luck with your project.