You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate per-game docker-compose examples from structured game data (e.g. ports) #161
Generate each game's docker-compose example (and Dockerfile, where useful) from richer per-game data, so the examples are correct for that game out of the box. For example, publish the game's default ports rather than a generic example.
Today
generate-dockerfiles.sh and generate-docker-compose.sh read LinuxGSM's serverlist.csv, which has only four fields per game: shortname, server name, game name and distro. The templates get those as separate environment variables, so there is nothing game-specific to put in the compose examples beyond the name and image tag.
Possible approach
Build one structured record per game (for example JSON). Start with the four serverlist.csv fields, and add data read from LinuxGSM, such as default ports from lgsm/config-default/config-lgsm/<shortname>server/_default.cfg.
Pass each game's record to the Jinja templates as one object (game.shortname, game.ports, and so on).
Keep the publish workflow's matrix as a list ({"include":[{"shortname":"..."}]}), the dockerfiles/Dockerfile-<shortname> names, and the ghcr.io base image.
Background
#103 (B13rg, 2024) started the refactor towards per-game JSON records but stopped before adding any new data, and it no longer fits the current generator and workflow. Its JSON conversion with yq and its game.* template variables are a useful starting point.
Activity