[PR #2101] [MERGED] POC changes for docker #3492

Closed
opened 2026-02-27 03:54:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/GameServerManagers/LinuxGSM/pull/2101
Author: @joshhsoj1902
Created: 12/8/2018
Status: Merged
Merged: 8/26/2020
Merged by: @dgibbs64

Base: feature/dockerHead: joshhsoj1902-changes-4-docker


📝 Commits (10+)

  • 4b460b1 Add gomplate support for templating configs
  • a70f149 Always return ip 0.0.0.0
  • 8bdeda9 Always test against an actual IP
  • 332284d Add checks for if we're running inside docker
  • 48a803e lookup hostname when in docker
  • e1f86f3 Merge remote-tracking branch 'origin/master' into joshhsoj1902-changes-4-docker
  • 9fed486 Merge remote-tracking branch 'origin/master' into joshhsoj1902-changes-4-docker
  • 44f5b32 fix tabbing
  • 802f161 fix paths
  • 72a4385 fix 0.0.0.0 return

📊 Changes

3 files changed (+45 additions, -19 deletions)

View changed files

📝 lgsm/functions/check_ip.sh (+4 -0)
📝 lgsm/functions/command_monitor.sh (+34 -14)
📝 lgsm/functions/install_config.sh (+7 -5)

📄 Description

As part of trying to make a dockerized version of LGSM there were a few src changes that I needed to make for it to work.

I always intended to polish them and try to contribute them back. Since @dgibbs64 is showing some interest in the project I wanted to expose the changes that I did make.

These changes in their current form are pretty small, but cannot be merged as is. They were done knowing that they would only need to work inside docker. I'm hoping through this PR we could potentially figure out the better ways to work around the issues I was encountering or potentially incorporate some changes into the main code base!

Edit (some additional details)

For me to actually get LinuxGSM running in docker I did need to make a few src changes though (fairly small ones). https://github.com/GameServerManagers/LinuxGSM/pull/2101

There were 2 things that I needed to be able to do.

  • I needed a way to inject config values into LinuxGSM. For this, I decided to use gomplate (a templating tool) to basically inject env vars into the common.cfg
  • When inside Docker it's easiest bind to all interfaces (when running in kubernetes or docker swarm you'll often have multiple network interfaces)
    • This didn't work so well out of the box because LinuxGSM does some health checking every 60 seconds. But it uses the same IP and 0.0.0.0 doesn't work for that.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/GameServerManagers/LinuxGSM/pull/2101 **Author:** [@joshhsoj1902](https://github.com/joshhsoj1902) **Created:** 12/8/2018 **Status:** ✅ Merged **Merged:** 8/26/2020 **Merged by:** [@dgibbs64](https://github.com/dgibbs64) **Base:** `feature/docker` ← **Head:** `joshhsoj1902-changes-4-docker` --- ### 📝 Commits (10+) - [`4b460b1`](https://github.com/GameServerManagers/LinuxGSM/commit/4b460b1823a288e19d6765a03ca20ed569c55953) Add gomplate support for templating configs - [`a70f149`](https://github.com/GameServerManagers/LinuxGSM/commit/a70f1497aee6752396acaa88e779e03ea1ae4aa9) Always return ip 0.0.0.0 - [`8bdeda9`](https://github.com/GameServerManagers/LinuxGSM/commit/8bdeda9dc31d27910399137b9d4478e909035173) Always test against an actual IP - [`332284d`](https://github.com/GameServerManagers/LinuxGSM/commit/332284debd91b9cc3b1917a64e7af13a288e8494) Add checks for if we're running inside docker - [`48a803e`](https://github.com/GameServerManagers/LinuxGSM/commit/48a803e4393c4903333d53b685c1518092803a9c) lookup hostname when in docker - [`e1f86f3`](https://github.com/GameServerManagers/LinuxGSM/commit/e1f86f3c243d4d62c83e2d3338045811df29ff0a) Merge remote-tracking branch 'origin/master' into joshhsoj1902-changes-4-docker - [`9fed486`](https://github.com/GameServerManagers/LinuxGSM/commit/9fed48696535ff7a437c4724675d24d084ee9014) Merge remote-tracking branch 'origin/master' into joshhsoj1902-changes-4-docker - [`44f5b32`](https://github.com/GameServerManagers/LinuxGSM/commit/44f5b32b692602bb361923c2562d9813ad582e34) fix tabbing - [`802f161`](https://github.com/GameServerManagers/LinuxGSM/commit/802f161e8b3ac8af2ec6c6798adc47d4d81783f8) fix paths - [`72a4385`](https://github.com/GameServerManagers/LinuxGSM/commit/72a4385619e1c2bafc1b30001c5af166a79d8ddc) fix 0.0.0.0 return ### 📊 Changes **3 files changed** (+45 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `lgsm/functions/check_ip.sh` (+4 -0) 📝 `lgsm/functions/command_monitor.sh` (+34 -14) 📝 `lgsm/functions/install_config.sh` (+7 -5) </details> ### 📄 Description As part of trying to make a [dockerized version of LGSM](https://github.com/joshhsoj1902/linuxgsm-docker) there were a few src changes that I needed to make for it to work. I always intended to polish them and try to contribute them back. Since @dgibbs64 is showing some interest in the project I wanted to expose the changes that I did make. These changes in their current form are pretty small, but cannot be merged as is. They were done knowing that they would only need to work inside docker. I'm hoping through this PR we could potentially figure out the better ways to work around the issues I was encountering or potentially incorporate some changes into the main code base! **Edit (some additional details)** For me to actually get LinuxGSM running in docker I did need to make a few src changes though (fairly small ones). https://github.com/GameServerManagers/LinuxGSM/pull/2101 There were 2 things that I needed to be able to do. - I needed a way to inject config values into LinuxGSM. For this, I decided to use gomplate (a templating tool) to basically inject env vars into the `common.cfg` - When inside Docker it's easiest bind to all interfaces (when running in kubernetes or docker swarm you'll often have multiple network interfaces) - This didn't work so well out of the box because LinuxGSM does some health checking every 60 seconds. But it uses the same IP and 0.0.0.0 doesn't work for that. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 03:54:42 +03:00
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#3492
No description provided.