Auto Tournament

Updating

Back up the database, update the image, and roll back if needed.

Run all commands in the folder with your docker-compose.yml and .env. To move from 2.x to 3.0, read Upgrading to 3.0 first.

Back up the database

The update does not delete your data, but make a backup first:

mkdir -p backups
docker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > "backups/autotournament-$(date +%F-%H%M%S).sql"

The command reads the database user and name from the container, so it also works if you changed DB_USER or DB_NAME. If the stack is down, start the database first with docker compose up -d postgres.

Pull the new image

docker compose pull

Restart

docker compose up -d

up -d replaces the app container with the new image and keeps the database volume. Database changes run on their own when the app starts.

Watch the log

docker compose logs -f matchzy-tournament

Wait until the log shows that the server started, then press Ctrl+C.

Check that it works

curl -fsS http://localhost:3069/health

If the app does not start, the log usually shows the reason. The most common causes are a missing value in .env or a database that cannot be reached.

Use a fixed version

latest always pulls the newest release. To choose when you update, and to make it easy to go back, use a version number in docker-compose.yml:

docker-compose.yml
services:
  matchzy-tournament:
    image: sivertio/matchzy-auto-tournament:2.4.15

Versions are listed on the releases page. The image tag has no v in front.

Go back to an older version

Set the older version

Set the older version in image: in docker-compose.yml, for example sivertio/matchzy-auto-tournament:2.4.13.

Pull and restart

docker compose pull
docker compose up -d

A newer version can change the database. If the older version does not start after that, restore the backup you made before the update into an empty database.

After you update

  • If you lost admin access, set ADMIN_STEAM_IDS. See First login.
  • Update Auto Tournament CS2 (formerly MatchZy Enhanced) on your servers too, so all servers run the same version. See Update the CS2 plugin, or run sudo csm update-plugins with CS2 Server Manager.
  • To free disk space from old images:
docker image prune -f

On this page