Files
gbr-games/schema/game.schema.json
T
Greg ReedandClaude Opus 5.5 1a28f6c52e
Validate game templates / validate (push) Successful in 28s
Validate game templates / boot-test (push) Failing after 3m51s
Validate game templates / publish (push) Skipped
feat(dragonwilds): MATCH_PUBLIC so the join code works behind a relay
The server advertises the address its outgoing traffic comes from, so it
binds its public ports (-Port / -BeaconPort from {PUBLIC_PORT_n}) and, behind
Public Bypass, sends its traffic out through the relay. Adds portMode to the
schema and to import's field order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZxvxViV6QwAtVWT3saGvs
2026-11-08 01:32:23 +00:00

98 lines
5.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://www.gitea.gbreed.com/gbreed-public/gbr-games/raw/branch/main/schema/game.schema.json",
"title": "GBR Hosting game template",
"description": "One game.yaml per game. Field names match the control panel's Game entity. Business settings (enabled, paid/private hosting, cover art, pricing tiers) are managed in the panel, not here.",
"type": "object",
"additionalProperties": false,
"required": ["id", "name", "defaultDockerImage", "installMethod"],
"properties": {
"id": {
"description": "Stable identifier. Must match the folder name. Never rename: servers reference it.",
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"maxLength": 64
},
"name": { "description": "Display name shown to users.", "type": "string", "minLength": 1 },
"defaultDockerImage": { "description": "Image the game server runs in.", "type": "string", "minLength": 1 },
"containerUser": {
"description": "uid:gid the server runs as, for images built around their own user, as inspect-image reports it. Defaults to 1000:1000; root is never allowed.",
"type": ["string", "null"],
"pattern": "^[1-9][0-9]{0,8}:[1-9][0-9]{0,8}$"
},
"defaultStartupCommand": { "description": "Command run inside the container. May use config placeholders.", "type": ["string", "null"] },
"requiredMemoryMb": { "type": ["integer", "null"], "minimum": 128 },
"requiredDiskMb": { "type": ["integer", "null"], "minimum": 128 },
"defaultPorts": {
"description": "Ports to expose, e.g. \"25565/tcp\", \"7777/udp\" or \"8211:8211/udp\".",
"type": ["array", "null"],
"items": { "type": "string", "pattern": "^([0-9]{1,5}:)?[0-9]{1,5}(-[0-9]{1,5})?(/(tcp|udp))?$" }
},
"installMethod": { "enum": ["STEAMCMD", "BASH_SCRIPT", "NONE"] },
"installConfig": {
"description": "STEAMCMD needs appId; BASH_SCRIPT needs script.",
"type": ["object", "null"]
},
"defaultConfig": {
"description": "Default values for every server. Users override these per server. Keys may only contain letters, digits, '_', '-' and '.' (the panel drops anything else).",
"type": ["object", "null"],
"propertyNames": { "pattern": "^[a-zA-Z0-9_.-]+$", "maxLength": 128 }
},
"configSchema": {
"description": "JSON Schema for the settings users can edit. A property with \"x-consent\" (e.g. an EULA) must be explicitly accepted on deploy.",
"type": ["object", "null"]
},
"configFilePath": { "description": "Where defaultConfig + user overrides are written, relative to the server root.", "type": ["string", "null"] },
"configFileFormat": {
"description": "INI writes key=value lines; STANDARD uses configFormatOptions (header, separator, quoting) for formats like Unreal's OptionSettings=(...).",
"enum": ["INI", "STANDARD", "JSON", "ENV", null]
},
"configFormatOptions": { "type": ["object", "null"] },
"agnosticCommandConfig": { "description": "How the panel sends console commands (save, broadcast, kick...).", "type": ["object", "null"] },
"clusterConfig": { "type": ["object", "null"] },
"logFilePath": { "type": ["string", "null"] },
"readyPattern": {
"description": "Regex matched against the server's console output and log file once it can accept players. Without one, boot tests only check the server stays up.",
"type": ["string", "null"]
},
"failPatterns": {
"description": "Regexes that mean the server will not come up (e.g. an unaccepted EULA). Boot tests fail as soon as one matches.",
"type": ["array", "null"],
"items": { "type": "string" }
},
"backupPaths": { "type": ["array", "null"], "items": { "type": "string" } },
"maxBackupSizeMb": { "type": ["integer", "null"], "minimum": 1 },
"publicIpConfigKey": { "description": "Config key that receives the server's public address.", "type": ["string", "null"] },
"portMode": {
"description": "MATCH_PUBLIC: for games that advertise the address their own traffic comes from. The container binds the port players use (the relay port behind Public Bypass) and, behind a relay, all its outgoing traffic leaves through the relay. Tell the game its port with {PUBLIC_PORT_<defaultPort>} in defaultStartupCommand.",
"enum": ["DEFAULT", "MATCH_PUBLIC", null]
},
"maxPlayersConfigKey": { "description": "Config key locked to the pricing tier's player count.", "type": ["string", "null"] },
"mapConfigKey": { "type": ["string", "null"] },
"aiCoverPrompt": { "type": ["string", "null"] }
},
"allOf": [
{
"if": { "properties": { "installMethod": { "const": "STEAMCMD" } } },
"then": {
"required": ["installConfig"],
"properties": { "installConfig": { "type": "object", "required": ["appId"] } }
}
},
{
"if": { "properties": { "installMethod": { "const": "BASH_SCRIPT" } } },
"then": {
"required": ["installConfig"],
"properties": { "installConfig": { "type": "object", "required": ["script"] } }
}
}
]
}