Compare commits
5 Commits
a78b4c1c13
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 790fb30018 | |||
| da36bdaeb3 | |||
| 1df6faecee | |||
| f13b588da9 | |||
| 1ed2371973 |
@@ -5,5 +5,10 @@ steps:
|
|||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: docker.kapelle.org/csgo
|
repo: djeeberjr/csgo-docker
|
||||||
registry: docker.kapelle.org
|
username: djeeberjr
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_HUB_TOKEN
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|||||||
@@ -8,4 +8,7 @@ USER steam
|
|||||||
VOLUME /home/steam/server
|
VOLUME /home/steam/server
|
||||||
WORKDIR /home/steam/
|
WORKDIR /home/steam/
|
||||||
|
|
||||||
|
ENV METAMOD_DL_URL "https://mms.alliedmods.net/mmsdrop/1.12/mmsource-1.12.0-git1165-linux.tar.gz"
|
||||||
|
ENV SOURCEMOD_DL_URL "https://sm.alliedmods.net/smdrop/1.12/sourcemod-1.12.0-git6968-linux.tar.gz"
|
||||||
|
|
||||||
ENTRYPOINT /home/steam/entrypoint.sh
|
ENTRYPOINT /home/steam/entrypoint.sh
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
`GAMEMODE`: What gamemode to load. Not the same as the `game_mode` cvar. Value gets translated to a gamemode/gametype combination. Available values are: `casual`,`competitive`, `wingman`, `armsrace`, `deathmatch`, `custom`, `coop`, `dangerzone`, `weaponexpert`,`demolition`,`stab_zap`,`ffa`,`flying_scoutsman`,`trigger_discipline`,`headshots`,`hunter_gatherers`,`retakes`,`competitive_short`. For more information see [here](https://developer.valvesoftware.com/wiki/CS:GO_Game_Mode_Commands).
|
`GAMEMODE`: What gamemode to load. Not the same as the `game_mode` cvar. Value gets translated to a gamemode/gametype combination. Available values are: `casual`,`competitive`, `wingman`, `armsrace`, `deathmatch`, `custom`, `coop`, `dangerzone`, `weaponexpert`,`demolition`,`stab_zap`,`ffa`,`flying_scoutsman`,`trigger_discipline`,`headshots`,`hunter_gatherers`,`retakes`,`competitive_short`. For more information see [here](https://developer.valvesoftware.com/wiki/CS:GO_Game_Mode_Commands).
|
||||||
|
|
||||||
|
`MAP_ROTATION` comma separated list of maps to populate the `mapcycle.txt` and `maplist.txt` files.
|
||||||
|
|
||||||
|
`SM_ADMIN` comma separated list of ids to grand admin privileges e.g. "STEAM_0:1:57874277", "!127.0.0.1"
|
||||||
|
|
||||||
# Custom conVars
|
# Custom conVars
|
||||||
|
|
||||||
You can set ANY other variable by just prefixing the conVar with `CVAR_`. So for example if you want to set `mp_disable_autokick 1` just set the enviroment variable `CVAR_MP_DISABLE_AUTOKICK` to `1`. Upper or lower case is ignored.
|
You can set ANY other variable by just prefixing the conVar with `CVAR_`. So for example if you want to set `mp_disable_autokick 1` just set the enviroment variable `CVAR_MP_DISABLE_AUTOKICK` to `1`. Upper or lower case is ignored.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ services:
|
|||||||
- GAMEMODE=retakes
|
- GAMEMODE=retakes
|
||||||
- RCONPW=password123
|
- RCONPW=password123
|
||||||
- CVAR_MP_DISABLE_AUTOKICK=1
|
- CVAR_MP_DISABLE_AUTOKICK=1
|
||||||
|
- MAP_ROTATION=de_nuke,de_dust2,workshop/298621139/am_trainyard
|
||||||
volumes:
|
volumes:
|
||||||
- csgo_game:/home/steam/server
|
- csgo_game:/home/steam/server
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -2,7 +2,26 @@
|
|||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
/home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/server +app_update 740 +quit
|
/home/steam/steamcmd/steamcmd.sh +force_install_dir /home/steam/server +login anonymous +app_update 740 +quit
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -e "$HOME/server/csgo/addons/metamod.vdf" ]; then
|
||||||
|
echo "Installing Metamod"
|
||||||
|
curl "$METAMOD_DL_URL" -o /tmp/metamod.tar.gz
|
||||||
|
tar -xf /tmp/metamod.tar.gz -C "$HOME/server/csgo"
|
||||||
|
rm /tmp/metamod.tar.gz
|
||||||
|
|
||||||
|
echo "Install Sourcemod"
|
||||||
|
curl "$SOURCEMOD_DL_URL" -o /tmp/sourcemod.tar.gz
|
||||||
|
tar -xf /tmp/sourcemod.tar.gz -C "$HOME/server/csgo"
|
||||||
|
rm /tmp/sourcemod.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$MAP_ROTATION" ]; then
|
||||||
|
echo -n "$MAP_ROTATION" | sed 's/,/\n/g' | tee "$HOME/server/csgo/mapcycle.txt" "$HOME/server/csgo/maplist.txt"
|
||||||
|
else
|
||||||
|
echo -n "" | tee "$HOME/server/csgo/mapcycle.txt" "$HOME/server/csgo/maplist.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
SRCDS_ARGS="-usercon"
|
SRCDS_ARGS="-usercon"
|
||||||
|
|
||||||
@@ -23,6 +42,11 @@ if [ -n "$INSECURE" ]; then
|
|||||||
echo "Running with VAC disabled."
|
echo "Running with VAC disabled."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NOMASTER" ]; then
|
||||||
|
SRCDS_ARGS="${SRCDS_ARGS} -nomaster"
|
||||||
|
echo "Running with nomaster."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$MAX_PLAYERS" ]; then
|
if [ -n "$MAX_PLAYERS" ]; then
|
||||||
SRCDS_ARGS="${SRCDS_ARGS} -maxplayers $MAX_PLAYERS"
|
SRCDS_ARGS="${SRCDS_ARGS} -maxplayers $MAX_PLAYERS"
|
||||||
echo "Maxplayers set to ${MAX_PLAYERS}."
|
echo "Maxplayers set to ${MAX_PLAYERS}."
|
||||||
@@ -130,6 +154,14 @@ if [ -n "$WORKSHOP_COLLECTION" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p "/home/steam/server/csgo/addons/sourcemod/configs/"
|
||||||
|
echo "// Autogenerated. DO NOT EDIT. Sourcemod admin can be added with the SM_ADMIN environment variable" \
|
||||||
|
> "/home/steam/server/csgo/addons/sourcemod/configs/admins_simple.ini"
|
||||||
|
for id in $(echo "$SM_ADMIN" | sed 's/,/\n/g')
|
||||||
|
do
|
||||||
|
echo "\"$id\" \"99:z\"" >> "/home/steam/server/csgo/addons/sourcemod/configs/admins_simple.ini"
|
||||||
|
done
|
||||||
|
|
||||||
CVARS=$(env | awk -F "=" '/^CVAR_/ { sub("CVAR_","",$1); print "+"tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""," "}' | tr -d "\n")
|
CVARS=$(env | awk -F "=" '/^CVAR_/ { sub("CVAR_","",$1); print "+"tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""," "}' | tr -d "\n")
|
||||||
|
|
||||||
echo "Running command: srcds_run -game csgo $SRCDS_ARGS $CVARS"
|
echo "Running command: srcds_run -game csgo $SRCDS_ARGS $CVARS"
|
||||||
|
|||||||
Reference in New Issue
Block a user