Help Switching to JSON Redis Stack
Anonymous
TRIALOP

2 years ago

Hello there, I'm trying to use a version of Redis on railway with the JSON extension. I came across Brody's answer here and started to follow along:
https://www.answeroverflow.com/m/1154090266093953065. Only issue is that the env variables didn't seem to carry over well. I had to change around some ports to get it to connect again but now it's not reading from the attached volume. All online help talks about changing the docker start command but the Build section is missing from the settings panel. How can I get it to connect to our existing volume?

51 Replies

Anonymous
TRIALOP

2 years ago

684aa05b-448a-4194-93fb-fa5a9fc97cc4


brody
EMPLOYEE

2 years ago

first off, can you please confirm if the start command field is missing from the service settings? not that I think you would need it, but that's an issue worth tackling first


Anonymous
TRIALOP

2 years ago

No the start command is visible


Anonymous
TRIALOP

2 years ago

Just build is missing


Anonymous
TRIALOP

2 years ago

So should I set the start command to:
docker run -v /local-data/:/data redis/redis-stack:latest


Anonymous
TRIALOP

2 years ago

And change my mount path to /local-data


brody
EMPLOYEE

2 years ago

oh okay sorry I misread your message a tad, build command would not be applicable for docker images so it is not shown in the UI


brody
EMPLOYEE

2 years ago

you can not change the docker run command railway uses like that


Anonymous
TRIALOP

2 years ago

Yeah sorry I was just confused because I deploy a docker image for another service on railway and the build section is present for that one


brody
EMPLOYEE

2 years ago

you have linked my previous thread that worked for them, I will try my method that I gave in that thread and let you know if it still works


Anonymous
TRIALOP

2 years ago

Great. To be clear my main issue is it connecting to a persistent volume. Pref one that already exists


brody
EMPLOYEE

2 years ago

did you have data in it?


Anonymous
TRIALOP

2 years ago

yes


Anonymous
TRIALOP

2 years ago

I can see the data is still there by looking at the data usage metric on the attached volume. I just don't think the redis instance is connected to it


brody
EMPLOYEE

2 years ago

how much disk is in use?


Anonymous
TRIALOP

2 years ago

~170mb


brody
EMPLOYEE

2 years ago

could just be the base amount of disk usage


brody
EMPLOYEE

2 years ago

redis is mostly an in memory store after all


Anonymous
TRIALOP

2 years ago

Pretty sure it's our data. I'm quite positive the default railway redis deploy uses persistence


Anonymous
TRIALOP

2 years ago

A brand new deploy is around 140mb


brody
EMPLOYEE

2 years ago

okay sounds good, I will first check the default redis database for data persistence, and then check if my original solution still works when back at my computer


Anonymous
TRIALOP

2 years ago

Yes please do because we low key just fried this database


brody
EMPLOYEE

2 years ago

you could always swap the volume itself back over to a regular redis database deployment in the mean time?


Anonymous
TRIALOP

2 years ago

How can I move volumes?


brody
EMPLOYEE

2 years ago

unmount and remount


brody
EMPLOYEE

2 years ago

if I get this working would you be interested in adding me to your project so I can make sure your redis database is setup correctly as it sounds like you may have made some unsavoury changes to it


Anonymous
TRIALOP

2 years ago

I can confirm by switching the image back to bitnami/redis:latest and then changing the mount point on the volume back to /bitnami I was able to restore my db back to what it was before the attempted change to one with JSON


Anonymous
TRIALOP

2 years ago

But this further proves that the main Redis image uses persistence


brody
EMPLOYEE

2 years ago

oh thats awesome, okay delete the redis json service then please as I'll provide instructions from scratch


Anonymous
TRIALOP

2 years ago

Sounds good


brody
EMPLOYEE

2 years ago

hey @Marc its not going to be possible to swap the volume from bitnami's redis to redis stack, they use a different file structure.

so instead, would you mind adding me to your project so i can get a new redis stack deployed for you, then i will set you up with a set of commands that will copy the data over!


Anonymous
TRIALOP

2 years ago

Sure how can I go about adding you?


brody
EMPLOYEE

2 years ago

my email is brodyover@gmail.com
add me via the members tab of your project


Anonymous
TRIALOP

2 years ago

Done


brody
EMPLOYEE

2 years ago

do you want to run the commands, or would you like me to?


Anonymous
TRIALOP

2 years ago

You can give it a shot


brody
EMPLOYEE

2 years ago

will do


brody
EMPLOYEE

2 years ago

data has been replicated, do i have your permission to switch the linkedIn-api service over to redis stack?


Anonymous
TRIALOP

2 years ago

I can probably take it from here. I don't want to keep taking up your time. You've been super helpful!


brody
EMPLOYEE

2 years ago

i would need to stop replication after its been switched over, thats why i asked if it was okay if i could switch it over


Anonymous
TRIALOP

2 years ago

AHH


Anonymous
TRIALOP

2 years ago

then yes


brody
EMPLOYEE

2 years ago

okay its redeploying now


brody
EMPLOYEE

2 years ago

can i take the Cache service offline? (this wouldnt remove any data)


Anonymous
TRIALOP

2 years ago

yup


brody
EMPLOYEE

2 years ago

okay you should be good to go now, let me know if everything works as it should


Anonymous
TRIALOP

2 years ago

Okay I'll test it rn


Anonymous
TRIALOP

2 years ago

Seemingly we're all good! Thank you so much for your help!


brody
EMPLOYEE

2 years ago

no problem, happy to help!


brody
EMPLOYEE

2 years ago

feel free to remove me from the project!


Anonymous
TRIALOP

2 years ago

Yup just did


Loading...