Auto Tournament

Upgrading to 3.0

Move from MatchZy Auto Tournament 2.x to Auto Tournament 3.0.

Not released yet

3.0 is in development. The current release is 2.4.x, which you can keep running. This page describes the upcoming update so you can plan for it.

Version 3.0 is the first release under the name Auto Tournament. Your data, teams, servers and settings move over when you update. This page shows what changes and how to update a Docker install.

What changes

  • The name. MatchZy Auto Tournament (MAT) is now Auto Tournament.
  • A new web interface. Pages and menus look different. The tasks stay the same.
  • The CS2 plugin has a new name. MatchZy Enhanced is now called Auto Tournament CS2. The source moved to github.com/Auto-Tournament/cs2-plugin. It is the same plugin. It still shows up as MatchZy in css_plugins list, and its settings still start with matchzy_. See Auto Tournament CS2.
  • The docs moved from docs.sivert.io/docs/mat to docs.autotournament.gg. Old links redirect to the new pages.
  • The Docker image has a new name: ghcr.io/auto-tournament/auto-tournament (GitHub's registry), with sivertio/auto-tournament on Docker Hub as a mirror. The old image, sivertio/matchzy-auto-tournament, keeps getting the same releases for a while, so an install that keeps the old name still updates.

Before you start

  • Your install runs 2.x with Docker Compose, as in Install.
  • No match is running. The app restarts during the update.
  • You have the folder with your docker-compose.yml and .env. Run all commands in that folder.

Update

Check your current version

curl -fsS http://localhost:3069/api/settings/version

The answer shows your version, for example {"success":true,"version":"2.4.15"}. Write it down, so you know which version to go back to.

Back up the database

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"

Check that the file in backups/ is not empty. 3.0 changes the database when it starts, so you need this backup if you want to go back to 2.x.

Change the image name

Open docker-compose.yml and find the image: line of the matchzy-tournament service. Change it to the new name:

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

Or run this command, which makes the same change and keeps a copy of the old file as docker-compose.yml.bak:

sed -i.bak 's#sivertio/matchzy-auto-tournament#sivertio/auto-tournament#' docker-compose.yml

Only change the image. Keep the service name, the container names, the volumes and DB_NAME as they are. A new database name starts an empty database.

If you want to keep the old image name for now, skip this step. sivertio/matchzy-auto-tournament:latest also gets 3.0.

Pull the new image

docker compose pull

Start

docker compose up -d

up -d replaces the app container and keeps the database volume. The database changes run when the app starts.

Check that it works

docker compose logs -f matchzy-tournament

Wait until the log shows that the server started, then press Ctrl+C. Then check the version:

curl -fsS http://localhost:3069/api/settings/version

It must show 3.0 or newer. Open the app in the browser and sign in.

Update the CS2 plugin on your servers

Put the same, latest version of Auto Tournament CS2 on every server. With CS2 Server Manager:

sudo csm update-plugins

Without CS2 Server Manager, see Update the CS2 plugin. Then click Refresh Status on the Servers page, and Retry on any server that is not set up.

Update bookmarks and links you shared: the docs are at docs.autotournament.gg, and the source is at github.com/Auto-Tournament/auto-tournament. Old GitHub links redirect.

Go back to 2.x

Set the old image

In docker-compose.yml, set the image to the version you wrote down, for example:

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

If you used the sed command, you can also put the copy back with mv docker-compose.yml.bak docker-compose.yml and set the version there.

Pull and restart

docker compose pull
docker compose up -d

Restore the backup if 2.x does not start

2.x may not start on a database that 3.0 has changed. Then stop the app, and load your backup into an empty database:

docker compose stop matchzy-tournament
docker compose exec -T postgres sh -c 'dropdb -U "$POSTGRES_USER" "$POSTGRES_DB" && createdb -U "$POSTGRES_USER" "$POSTGRES_DB"'
docker compose exec -T postgres sh -c 'psql -U "$POSTGRES_USER" "$POSTGRES_DB"' < backups/autotournament-YYYY-MM-DD-HHMMSS.sql
docker compose up -d

Use the name of your backup file. dropdb deletes everything that 3.0 wrote after the backup.

On this page