Cannot Get Private Networking working for Go app and ChromaDB
ID: c6a718e0-23e7-4d39-85b8-cd951a53c53f
So I have a Chroma Vector DB with that ID and I have it's PORT variable set to 8000 which is what it naively listens on. I have it as chroma.railway.internal but my app cannot seem to hit that. The strange thing is that when I enable the public networking, it can access it on the generated domain:443. I'll paste the error I'm getting down here:
Does anyone have some suggestions?
35 Replies
Project ID:
c6a718e0-23e7-4d39-85b8-cd951a53c53f,41f01962-2e35-4e48-a28b-1f107d378c6f
are you building with a dockerfile
Hey Brody! Yes i am here's my dockerfile :
I switched from the alpine build to bookworm because I saw alpine can cause issues with private networking
then I guess you already knew what I was going to say
tbh I'm not a docker expert so Idk if bookworm gets rid of alpine. I can try with a nixpack
try changing your CMD line to
CMD sleep 3 && /biblesearch
bookworm is a Ubuntu baseOkay cool, running that rn
you also don't need any of those ARG or ENV lines, that's only needed if you need a variable during build
Oh okay I did not know that
I am not sure if I typed that incorrectly maybe
CMD ["sleep 3 && /biblesearch"]
show me your new dockerfile
without the brackets like I wrote it
Okay I will try that thanks
okay new error I think this is app level though maybe:
chroma needs to be listening on
::
Can i set that in the port env var for my chroma instance?
depends, does it have an applicable environment variable to set the host it listens on?
I don't think so I can take a loot at the docs, I am just using the default template right now
I'll try it anyway
default template leaves a lot to be desired I'm told
Yeah it basically just sets up the default dockerfile and a volume it seems
does it deploy from a github repo?
No just from their github docker repo
well thats something at least
yeah im looking at the data for the template, doesnt come with any service variables for things like public or private database url
Yeah it had 0 variables set which is a little frustrating because I am not sure what I can configure in it
yeah unfortunately railway does not yet have any quality control for templates
Still building I am not sure if it's just taking a long time or what just an fyi
no logs either I might restart that deploy
it failed anyway
we talking about the chroma service?
Yeah correct
I just hit redeploy on the latest deployment
Okay it's me making it fail I was setting PORT to :: on the chroma service so I think you cannot do that lol
::
is not a port lol
its a host
and the host is set to 0.0.0.0
https://github.com/chroma-core/chroma/blob/main/bin/docker_entrypoint.sh#L7Hm okay I am wondering If i can set it's host to :: somehow
Solution
try setting this as the start command
deploying, I did not know you could edit start command for stuff in docker lol that is super useful
promising
yeah opens up a lot of doors
I am an idiot i set that as start for my app one sec gotta switch it around
THAT WORKS
uvicorn doesn’t support dual stack binding, so chroma will now only work on the private ipv6 network and not the public ipv4 network
Okay that is totally valid, thank you so much man I totally appreciate you, you've helped me before as well just wanted to give you such a shoutout
haha no problem, im happy to help