redis
How to connect Redis by
railway connect
, does a template exist to connect Redis with railway connect
?
Now I connect with username/password, but I'm finding a way to connect without a username.
ProjectId: 38fe79a8-c127-4e50-ba67-eab1ce076502
ServiceId: e95b93c0-d4a0-4be2-8a1b-2addbf59d61640 Replies
Project ID:
38fe79a8-c127-4e50-ba67-eab1ce076502
38fe79a8-c127-4e50-ba67-eab1ce076502
there would need to be a redis plugin in the project you've linked with the cli
railway connect
should not ask you for a username or password to connect to redis, since that would defeat the purpose of the commandYou mean
railway connect
is an interactive input to connect Redis? It also needs username and password?it does not need a username or password
sorry, I miss
not
, where is the plugin?have you created a project in railway?
yes, 38fe79a8-c127-4e50-ba67-eab1ce076502 is the project id
does that project have a redis plugin in it?
(I'm just a community member I can't see anything about your project with your id)
I add a redis server, but I don't know what is redis plugin.
a plugin is just the name we give to the provided databases, mysql plugin, mongodb plugin, etc
but yeah that looks good to me
do you have the railway cli installed on your computer?
I want to use
railway connect
in the kuai
server but not on my computer. Currently, I use the variable to connect it.railway connect is for your computer, I think you're mistaken
if you want to connect to the redis database from your kuai service you are going to first need to setup all the needed variable references for redis
https://docs.railway.app/develop/variables#reference-variables
got that, I mistake thought there is exist one way to connect it to other services without username/password
please do that and then show me another screenshot of your service variables
I have connected Redis success with variables. Thank you for your help.
I mistake thought that
railway connect
is used for other services.so all good, problem solved?
yes, I have another problem with the private network between the two services. Do you have a template that how to use a private network?
I do, but I'm gonna need more information on your desired usecase
The
kuai-mvp-dapp-ui
is created by next
, the kuai
service is created by Koa
, and I want to call kuai
api by private network from kuai-mvp-dapp-ui
okay one sec while I Google what Koa is
okay Koa is express but better
I have set all of the service hosts to ipv6(::1), but it seems not to call
kuai
success by a private network.
And after I set host to ::1, the public service is also failed.so this request would need to be done by the next backend, the client browser of the site will not be able to call the private network, wouldnt be very private if that was possible
can you show me the line of code that contains your app.listen call?
the port and host is from variable
and what is host and port set to?
delete both those variables
and use this code instead
thanks, I will try
and you are calling the koa service from the next backend right?
actually, in the next front end.
thats not possible
Should I use nginx to proxy these two service?
wait let me rephrase that question
are you going to be calling the koa service's private domain from the next backend?
I guess I need proxy the request from next, otherwise, the request will send from the browser to
koa
service, and the browser cannot visit the private network. Am I right?you are correct, but you dont need a proxy, just call the koa public domain
That's right, if I don't want to expose the
koa
, I need a proxy.you do need to expose the koa service though
a proxy is just exposing the service with extra steps, it doesnt add any of the security benifts you think it would
You are correct. Thank you very much. Have a good day.
well that was easy, i thought id need to do some more convincing
glad i could help!