Skip to content

Commit

Permalink
Update README.md (#55)
Browse files Browse the repository at this point in the history
* Update README.md

--restart=unless-stopped would be nice for beginners, so the server restarts after a reboot.

Signed-off-by: Jonathan Funke <[email protected]>
Co-authored-by: Renegade-Master <[email protected]>
  • Loading branch information
funkekaiser and Renegade-Master authored Jan 15, 2023
1 parent d92c141 commit f5948f0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ docker run --detach \
docker.io/renegademaster/zomboid-dedicated-server:latest
```

The default behaviour of the Container is not to automatically restart after a crash to give the user time to investigate the cause of the issue. You may however want to change the [restart policy](https://docs.docker.com/engine/reference/run/#restart-policies---restart) to automatically recover from an unexpected failure. The following options will help to recover from such a situation:

- `--restart=unless-stopped` will restart the container every time that it exits unless the Container is stopped using the Docker/Podman API.
- `--restart=on-failure[:max-retries]` will restart the container only if it exits with a non-zero exit code. Optionally, it can also be configured to only restart a fixed number of times to help prevent crash-loops.

These same options can be set in the `docker-compose.yaml` file.

### Assurance / Testing

For every commit, the server is built and started briefly using GitHub Actions. This is to ensure that the server always
Expand Down Expand Up @@ -192,7 +199,7 @@ The following are instructions for running the server using the Docker image.
```shell
git clone https://github.com/Renegade-Master/zomboid-dedicated-server.git \
&& cd zomboid-dedicated-server
docker build -t docker.io/renegademaster/zomboid-dedicated-server:<tag> -f docker/zomboid-dedicated-server.Dockerfile .
```

Expand All @@ -209,6 +216,7 @@ The following are instructions for running the server using the Docker image.
--mount type=bind,source="$(pwd)/ZomboidConfig",target=/home/steam/Zomboid \
--publish 16261:16261/udp --publish 16262:16262/udp [--publish 27015:27015/tcp] \
--name zomboid-server \
[--restart=no] \
[--env=ADMIN_PASSWORD=<value>] \
[--env=ADMIN_USERNAME=<value>] \
[--env=AUTOSAVE_INTERVAL=<value>] \
Expand Down

0 comments on commit f5948f0

Please sign in to comment.