LinuxGSM-Docker icon indicating copy to clipboard operation
LinuxGSM-Docker copied to clipboard

improvement: let docker do what tmux used to. and define gameserver as an environment variable.

Open AvverbioPronome opened this issue 4 years ago • 7 comments

Hi, people. I guess there is no easy way to run the server in foreground other than debug mode, right?

However, I did this, and it probably no longer needs tmux. (I don't know LinuxGSM well enough and I only tested Quake2)

If there are nontrivial consequences from running a server permanently in debug mode, please tell me.

AvverbioPronome avatar Feb 15 '20 17:02 AvverbioPronome

I've been trying to go through lgsm's source to see if I could avoid the ugly hack "echo Y | ./gameserver debug" but I had no luck.

AvverbioPronome avatar Feb 16 '20 16:02 AvverbioPronome

it could be possible to add either a new command or a setting to remove tmux ./csgoserver docker-start or somthing like that maybe?

dgibbs64 avatar Feb 16 '20 17:02 dgibbs64

I guess a command like ./csgoserver foreground could be more appropriate, but yeah, it makes sense.

AvverbioPronome avatar Feb 16 '20 17:02 AvverbioPronome

relevant https://github.com/GameServerManagers/LinuxGSM/pull/2026/files

GitHub
Docker support. Start game without tmux and game runs in foreground. Why without tmux? Hope it helps to push forward your docker repository.

dgibbs64 avatar Feb 16 '20 23:02 dgibbs64

I am currently thinking about LinuxGSM commands as arguments might be implemented moving forward so the command might end up being ./csgoserver start --forground for example.

dgibbs64 avatar Feb 16 '20 23:02 dgibbs64

also to answer your question there are no issues running your server in debug mode apart from needing an active terminal which shouldn't be an issue in docker

dgibbs64 avatar Feb 16 '20 23:02 dgibbs64

I like this idea of using command arguments.

And yeah, in docker it is expected that applications run in foreground, and if they exit the container itself exits (and docker restarts it if the restart policy says so).

On another note: I am working on a separate branch to avoid installing every dependency for every server at once, it's a lot faster to bring up. :D

AvverbioPronome avatar Feb 16 '20 23:02 AvverbioPronome