Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/timche/docker-csgo-updater

Automatically update Counter-Strike: Global Offensive (CS:GO) Dedicated Servers running in timche/csgo image containers
https://github.com/timche/docker-csgo-updater

container counter-strike counter-strike-global-offensive csgo dedicated-server docker global-offensive restart server update

Last synced: 2 months ago
JSON representation

Automatically update Counter-Strike: Global Offensive (CS:GO) Dedicated Servers running in timche/csgo image containers

Awesome Lists containing this project

README

        

# docker-csgo-updater



GitHub CI


Docker Image Version (latest semver)


Docker Image Size (latest semver)


Docker Pulls


Docker Stars

> Automatically update Counter-Strike: Global Offensive (CS:GO) Dedicated Servers running in [timche/csgo](https://github.com/timche/docker-csgo) image containers

## How to Use This Image

```
$ docker run -d \
--name csgo-updater \
-v /var/run/docker.sock:/var/run/docker.sock \
timche/csgo-updater
```

More advanced usage and how it works can be found below.

## Environment Variables

##### `UPDATER_CONTAINER_IMAGE`

Default: `timche/csgo`

The Docker containers running the specified image name csgo-updater will watch.

##### `UPDATER_POLL_INTERVAL`

Default: `60`

The poll interval (in seconds) csgo-updater will poll for new containers.

## How It Works

csgo-updater is attaching to the stdout of the containers and will restart them when their CS:GO server process is logging `MasterRequestRestart`, which is a request from the Steam Master Server to tell the CS:GO server that an update is available and the server should restart.

To restart, csgo-updater will send `SIGINT` to the container, which is not immediately killing the CS:GO server process but instead the process will check if the server is empty or will wait for the server to be empty and then shut it down which will also stop the container. After that, csgo-updater will start the container again and [the CS:GO server will be updated before starting the server](https://github.com/timche/docker-csgo#updating-the-server).

**Note:** If the CS:GO server container has a restart policy set, the policy won't restart the container in this case, because csgo-updater is stopping the container manually. See [Docker restart policy details](https://docs.docker.com/config/containers/start-containers-automatically/#restart-policy-details).