GameServerManagers / LinuxGSM-Docker

The Official LinuxGSM Docker image (experimental)
https://linuxgsm.com
MIT License
168 stars 73 forks source link

Request for new gameserver log command for docker logs #21

Open AlexCloudDev opened 3 years ago

AlexCloudDev commented 3 years ago

Hello, I'm trying to help out with a new approach for docker container integration. I made some progress so far, but i have to overcome some limitations of docker/LinuxGSM:

I use a run.sh as entrypoint and therefore i need a proper PID 1 process for the container. Due to the fact, that gameserver start spawns the server as new process, i can't use it. Therefor it would be perfect, if some gameserver log command would exist, that outputs the gameserver logs into the shell like gameserver debug does and runs as long as the gameserver does.

Then, the run.sh could look like this: #!/bin/bash .... su -c "gameserver start" $user su -c "gameserver log" $user

With this aproach, docker logs -f gameserver-container would flawlessly provide all the logging from the gameserver.

Cheers

dgibbs64 commented 3 years ago

https://github.com/GameServerManagers/LinuxGSM/issues/3244