From 1aa4d0dbc93219ac359fc9e36f9095f595d7b526 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Fri, 5 Apr 2024 02:22:54 +0300 Subject: [PATCH] update template --- .github/.teamplate-README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/.teamplate-README.md b/.github/.teamplate-README.md index 284ecf2..dba5002 100644 --- a/.github/.teamplate-README.md +++ b/.github/.teamplate-README.md @@ -6,4 +6,33 @@ Docker logoMod logo -This Docker image contains the HLDS of the `$mod` game. \ No newline at end of file +This Docker image contains the HLDS of the `$mod` game. + +At [00:00 on Sunday](https://github.com/$githubRepository/blob/master/.github/workflows/CI.yml) using [GitHub Actions](https://github.com/$githubRepository/actions), all images are automatically [rebuilt and published](https://github.com/$githubRepository/blob/master/.github/workflows/CI.yml) to Docker Hub (https://hub.docker.com/u/$dockerUser). + +## Usage +### Default fast start +```bash +docker run --rm -ti $dockerUser/$mod:public +``` +This will start you `$mod` server with the default startup parameters specified in `CMD`. + +### Custom launch params +```bash +docker run --rm -ti -p 27015:27015/udp $dockerUser/$mod:public ./hlds_run -game $mod +ip 0.0.0.0 -port 27015 +map crossfire +``` + +## About +### CMD +The default `CMD` for an image is: +```Dockerfile +CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(head -n 1 ./${MOD}/mapcycle.txt)"]] +``` + +> [!NOTE] +> `$(head -n 1 ./${MOD}/mapcycle.txt)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server. + +These values allow you to execute a string of initialization commands before calling the game binary. + +### WORKDIR +The default [work directory](https://docs.docker.com/reference/dockerfile/#workdir) for all the images is `/home/hlds` within which all of a game's files reside.