Ruby: Redis client can't connect via internal Redis URL
My Ruby on Rails app isn't able to connect to the Redis service anymore after switching to the private URL. Could I be missing anything in the configuration?
8 Replies
Project ID:
f0ab4608-eb94-44bb-ba1e-1bb688cba167
f0ab4608-eb94-44bb-ba1e-1bb688cba167
error message:
might be the case that the underlying DNS resolver is trying to find the
redis.railway.internal
on the public DNS but can't? anything i need to do in my container configuration to make it work?looks like private networking isn't getting configured properly in my container. how do i do that? i tried
ENABLE_ALPINE_PRIVATE_NETWORKING
but didn't work since my base image is ruby3.3-slim-bullseye (https://github.com/docker-library/ruby/blob/52e176c1dee983d991d9cff0c6371f5c50bfd636/3.3/slim-bullseye/Dockerfile)GitHub
ruby/3.3/slim-bullseye/Dockerfile at 52e176c1dee983d991d9cff0c6371f...
Docker Official Image packaging for Ruby. Contribute to docker-library/ruby development by creating an account on GitHub.
if i were to update the dns resolver, which address should i use so that railway is able to do private networking? thanks!
simply add a 3 second sleep before your app starts
lemme try that
could you please share some code on how that is best done?