Regex issue fixed; container resilience added; loading screen implemented.
The issue is that the requests are being caught in the regex location and routed to :8080, as there is no name in the subdomain. The reason it was working locally is because I was calling it with the subdomain localhost, and localhost is the name of my fallback server in the nginx config. :facepalm:
I can fix this with a simple hack without rebuilding the image by using localhost.be.codeinteractive.dev for all orchestrator calls. Good enough.
Ok, it works now, although first the code-server window displays 502 because the container hasn't had time to load yet.
Also, if I kill the container, it will never get started again. I need to build this system to be more resilient to crashes.
I've made the starting more resilient. The start endpoint is now idempotent, and stopped containers can be started without being recreated.
Now, I have to display a loading screen whenever a container isn't ready yet.
I've added a loading indicator.
Now I realize that changing steps is failing with this error:
Failed to execute command: chdir /tmp/rokokovac98/testing-in-dotnet: no such file or directory
I suspect it might be because the folder is hardcoded somewhere.
I added an init endpoint and things almost seem to be working. Code-server is giving me an error which can be ignored for now I guess? Anyways, its nearly midnight and I'm done for today