Coder.comC
Coder.com7mo ago
12 replies
Jason Overmier

Preconfigured Shared Ports

Is there a way to preconfigure shared ports to public in a coder template?

I am trying to run Hasura in a docker container within coder (docker in Envbox). Another dashboard docker image uses the exposed Hasura URL. I don't have a way to set credentials: "include" within the fetch calls of the dashboard. The only way to get everything working is for me to manually set the "Shared Port" to public. I am trying to automate creating a workspace and running the docker stack and would prefer to not have to manually set this value on every workspace. Is there a way to preconfigure this port to be public or script the startup script to expose the port as public?
image.png
Solution
I was able to get this url to load:
https://nhost-dashboard--main--a1--jovermier.coder.hahomelabs.com
but this url with the additional apps didn't work.
https://nhost-dashboard--main--a1--jovermier-apps.coder.hahomelabs.com/

I haven't seen the apps suffix on a username before in the docs. Is this a feature?

Switching to using the slug rather than the port number fixed the issue. Thank you for the help 🙂
Was this page helpful?