דיון על Github Codespaces לא עובד

סיכום מבוסס בינה מלאכותית

A user, reinier, reports that Discourse in GitHub Codespaces gets stuck with a 502 Bad Gateway error after the creation log ends. Falco seeks input from cvx, who confirms it should work and explains the missing step: starting the server by running bin/ember-cli -u in the terminal. cvx provides screenshots showing the process and notes there’s room for improvement. reinier confirms the solution worked.

I’ve tried to run Discourse in Github Codespaces and it seems to get stuck somewhere.

The creation log ends with these lines:

Cleaning stale PID files
run-parts: executing /etc/runit/1.d/ensure-database
Started runsvdir, PID is 231

But the url that is available in the ports tab gives a 502 Bad Gateway.

Also the state of the terminal seems like it’s still doing something.

Running postStartCommand...

I haven’t found any docs about it, but there seems to be some support for it according to this message and the .devcontainer directory.

Does it still work? Are there any steps I need to take to make it work?

I tested it when I first added support for it years ago. Recently @cvx was working on it, any ideas ?

I think everything should be working fine – the only step you’re missing is starting the server :smiley:

Switch to the other terminal tab (bash):

and run: bin/ember-cli -u

After it starts you can open the site by cmd-clicking/ctrl-clicking the URL in the output:

And you’re done!


I think we can streamline it a bit more. There’s definitely room for improvement!

Thanks, that did the trick!