diff --git a/README.md b/README.md
index 2ce6069..00e5aff 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,17 @@
A docker image for running a dedicated server for the game [CS:GO](https://blog.counter-strike.net/). Configured to use the [Get5](https://github.com/splewis/get5/) plugin alongside [Metamod:Source](https://www.sourcemm.net/) and [Sourcemod](https://www.sourcemod.net/) to host a quick setup scrim server. This is a modified version of [CM2Walki's](https://github.com/CM2Walki/CSGO) Dockerfile.
# How to use this image
+
## Simple usage (recommended)
Clone this repository locally:
+
```console
$ git clone https://github.com/FragSoc/csgo-server-scrim.git
```
Create a new directory for the game installation:
+
```console
$ mkdir -p $(pwd)/csgo-data
$ chmod 777 $(pwd)/csgo-data # Makes sure the directory is writeable by the unprivileged container user
@@ -18,11 +21,13 @@ $ chmod 777 $(pwd)/csgo-data # Makes sure the directory is writeable by the unpr
**Look at configuration section below for guidance.**
Run docker-compose up:
+
```console
$ docker-compose up
```
Due to the config files needing to be generated by the plugin, you'll have to stop the container and start it again for the setup to complete:
+
```console
$ docker-compose up
```
@@ -30,25 +35,33 @@ $ docker-compose up
**The container will automatically update the game on startup, so if there is a game update just restart the container.**
# Configuration
+
##Custom server settings
Before you run the initial startup, you will need to edit the custom_server_template.cfg file within the same dirtectory. This will be used to overwrite the /cfg/server.cfg file each time the server starts.
Should you wish to make any edits once the server has been created, you can do so using the below command and the server will use them once restarted:
+
```console
$ docker exec -it *CONTAINER_NAME* nano /home/steam/custom_server_template.cfg
```
## Environment Variables
-You can overwrite these values within the docker-compose file, below are the defaults:
+
+You can overwrite these values within the docker-compose file, below are the defaults:
+
```dockerfile
-SRCDS_PORT=27015
-SRCDS_TV_PORT=27020
-SRCDS_CLIENT_PORT=27005
-SRCDS_TOKEN=0
-METAMOD_VERSION=1.10
+SRCDS_PORT=27015
+SRCDS_TV_PORT=27020
+SRCDS_CLIENT_PORT=27005
+SRCDS_TOKEN=0
+MATCH_LENGTH=normal
+METAMOD_VERSION=1.10
SOURCEMOD_VERSION=1.10
```
+
**If you edit the ports you will need to adjust these within the docker-compose file also.**
+
## Additional config (to-do)
+
The image also contains a copy of the official ESL config files from [here](https://play.eslgaming.com/download/26251762/). You will need to disable the Get5 plugin however (to-do)
If you want to learn more about configuring a CS:GO server check this [documentation](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Advanced_Configuration).
diff --git a/docker-compose.yml b/docker-compose.yml
index 9755602..2981542 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,4 +9,5 @@ services:
- SRCDS_TOKEN=309E76122D3C7522154AC7513C51984E
- SRCDS_PORT=27015
- SRCDS_TV_PORT=27020
+ - MATCH_LENGTH=normal # Set normal for standard competitive and short for short match
- SCRIM=true # Set false for a team structured config
diff --git a/entry.sh b/entry.sh
index 587736d..0aa2b77 100644
--- a/entry.sh
+++ b/entry.sh
@@ -46,6 +46,13 @@ else
sed -i -e 's/get5_kick_when_no_match_loaded "0"/get5_kick_when_no_match_loaded "1"/g' "${STEAMAPPDIR}/${STEAMAPP}/cfg/sourcemod/get5.cfg"
fi
+if [ $MATCH_LENGTH == 'short' ]
+then
+ echo "Configuring for SHORT match"
+ # Alter values in Get5 config to be configured for short match
+ sed -i -e 's/mp_maxrounds 30/mp_maxrounds 16/g' "${STEAMAPPDIR}/${STEAMAPP}/cfg/get5/live.cfg"
+fi
+
# Believe it or not, if you don't do this srcds_run shits itself
cd ${STEAMAPPDIR}