Default docker-code-server template is stuck on connecting

Hey all, I am trying to test coder but it just says connecting. I have tried both 127.0.0.1, the IP of the server and the external url as the CODER_ACCESS_URL but none seem to make it work.
No description
8 Replies
bpmct
bpmct3y ago
Hmm... Can you check the logs of the container?
docker ps # list containers
docker logs <container-id>
docker ps # list containers
docker logs <container-id>
dorkbydesign
dorkbydesign3y ago
Thanks for following up, Ben. We've managed to figure it out. Turns out we needed to set our CODER_ACCESS_URL to our localhost URL and also enable WebSocket forwarding/upgrade in nginx as per https://www.nginx.com/blog/websocket-nginx/
Web Team
NGINX
Using NGINX as a WebSocket Proxy
Learn how to use NGINX as a reverse proxy and load balancer for WebSocket applications
dorkbydesign
dorkbydesign3y ago
Hope this helps someone else with the same issue!
Phorcys
Phorcys3y ago
that shouldn't be the case though my access url is my domain here i'm afraid that setting your access URL to localhost will break stuff in the future
bpmct
bpmct3y ago
Ideally, you'd set access URL to the domain / external IP of the server, yeah. As long as Coder/nginx is being served there it should work. The localhost access URLs will only work with Docker-based templates
Phorcys
Phorcys3y ago
well, it would work in others if you replaced in those too, no ?
bpmct
bpmct3y ago
I guess if you changed the replace to the IP instead of docker.host.internal. At that point, you should set an access URL, though
Phorcys
Phorcys3y ago
yeh
Want results from more Discord servers?
Add your server