Deployed to fly.io and it auto-deployed with redis. How?
I have an app deployed without redis. I just tried deploying a new version of it with redis wried up to a new org to test it out and it auto-detected redis and created an upstash redis machine. How does it do this? Will it automatically do this if I re-deploy my existing app that doesn't have redis wired up yet?
7 Replies
Hi @wardbox. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I apologize, but the knowledge sources provided do not contain any information about Wasp automatically deploying or detecting Redis on Fly.io. The documents mainly focus on deploying Wasp applications to Fly.io using the Wasp CLI or manual deployment methods, but they don't mention Redis integration or auto-detection.
To accurately answer your question about Redis auto-detection and deployment on Fly.io with Wasp, we would need additional information that is not present in the given knowledge sources.
If you're experiencing unexpected behavior with Redis deployment, I recommend checking the official Wasp documentation or reaching out to the Wasp community for more specific information about Redis integration and deployment behavior.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @wardbox, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Alrighty, trying to deploy what's on main (without redis) to a new org, then bring in redis changes and re-deploy to see how this works
looks like it's detected on launch but not re-deploy. im trying out
1.
flyctl redis create
and follow prompts, it spits out the url
2. set my env var for the redis url that it gives me
3. wasp deploy fly deploy
that worked ^Thanks for the info @wardbox !
👍🏾
@wardbox where in wasp do you connect to the redis client? would serverSetup.ts make sense?
I have not worked on setting up redis before
I just built a redis.ts file which sets up a class, handles all the operations I need and lets me initialize a redis client, then I call that from my operations where it’s needed
Lemme see if I can get you a gist of the basics
asked AI to simplify what i had since i have a bunch of specific use case stuff, haven't tested this but it's basically what i'm doing
https://gist.github.com/wardbox/0ffc375980e040d620fa60ae898ab126
Gist
Example redis client
Example redis client. GitHub Gist: instantly share code, notes, and snippets.
Thank you. This is cleaner as I've just got it working by adding the connector to the serverSetup file.
I'll clean it up using this