PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

How to use redis on digital ocean app platform for wave.

Solved
thegrizlabs

Apr 7th, 2024 11:40 AM

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?

bobbyiliev

Apr 8th, 2024 01:05 AM

Best Answer

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!

Report
1
thegrizlabs

Apr 8th, 2024 04:49 AM

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! 😊

bobbyiliev

Apr 10th, 2024 12:51 AM

Hey!

No worries at all! Happy to help and happy to hear that it is all working now.

Good luck with your project.