R
Railwayβ€’14mo ago
sdan

Run dockerfile exposing 8000 port?

i am trying to run https://github.com/chroma-core/chroma dockerfile it works on my machine but i can't expose the port 8000 on railway. the dockerfile exposes the 8000 port. heres how it runs on my machine: docker build docker run -p 8000:8000
GitHub
GitHub - chroma-core/chroma: the AI-native open-source embedding da...
the AI-native open-source embedding database. Contribute to chroma-core/chroma development by creating an account on GitHub.
20 Replies
Percy
Percyβ€’14mo ago
Project ID: 186328e3-739e-42c7-9076-98f6f6efeb5d
sdan
sdanβ€’14mo ago
186328e3-739e-42c7-9076-98f6f6efeb5d
Brody
Brodyβ€’14mo ago
you would just set PORT = 8000 in your service variables
sdan
sdanβ€’14mo ago
if i run docker in the build/run stage on railway itself it says docker isn't a valid command
sdan
sdanβ€’14mo ago
like this?
Brody
Brodyβ€’14mo ago
but this app wont work on railway if 1. it doesn't communicate over http/ws or 2. needs persistent storage
sdan
sdanβ€’14mo ago
it does communicate over https. i can actually show you logs that show its running on 0.0.0.0:8000 no persistent storage -- i will change that later, just trying to get it to work rolling back now -- i can share the deployment in a sec deployment: bd7b3224-41d2-4475-8e7b-3b25ecada779 if thats at all helpful
Brody
Brodyβ€’14mo ago
i cant do a single thing with that the bot asks you to provide it incase the team needs to get involved, and in your case, they dont
sdan
sdanβ€’14mo ago
here is what i see https://chromadb.up.railway.app is the domain 8000 is the port it should be on but for some reason railway isn't opening that up
Brody
Brodyβ€’14mo ago
you can only access your service over port 443, setting PORT = 8000 just tells railway to forward traffic between 8000 internally and 443 externally accessing your app from https://chromadb.up.railway.app/ works using the https schema without a specified port implies the use of port 443
sdan
sdanβ€’14mo ago
is there no support for http?
Brody
Brodyβ€’14mo ago
thats correct, secure by default and only secure
sdan
sdanβ€’14mo ago
alright...ssl is a pain but found a hidden variable that enables it in the library i am trying to use. great work
bebop
bebopβ€’11mo ago
@sdan.io were you able to get this to work? I tried setting ssl=True but still timeout 😦
bebop
bebopβ€’11mo ago
I see, unfortunately still timing out though when trying to connect from Chroma client. Wondering if I need to set anything else in the server config besides ssl=True, maybe need to change hostname and port?
chroma_server_host: Optional[str] = None
chroma_server_headers: Optional[Dict[str, str]] = None
chroma_server_http_port: Optional[str] = None
chroma_server_ssl_enabled: Optional[bool] = False
chroma_server_grpc_port: Optional[str] = None
chroma_server_cors_allow_origins: List[str] = [] # eg ["http://localhost:3000"]
chroma_server_host: Optional[str] = None
chroma_server_headers: Optional[Dict[str, str]] = None
chroma_server_http_port: Optional[str] = None
chroma_server_ssl_enabled: Optional[bool] = False
chroma_server_grpc_port: Optional[str] = None
chroma_server_cors_allow_origins: List[str] = [] # eg ["http://localhost:3000"]
Brody
Brodyβ€’11mo ago
wanna open your own thread please?
bebop
bebopβ€’11mo ago
yeah will do, just thought it would make sense to continue the conversation here because it is the same topic
Brody
Brodyβ€’11mo ago
i can see your logic but that just sends a bunch of notifications to the op
bebop
bebopβ€’11mo ago
no need, got it working! sdan posted more info about it in the Chroma server πŸ˜„ turns out the you needed to set the port client side to 443, which seems unintuitive to me and I don't fully understand? but happy its live and working