You can host Tournia yourself by following the documentation below. If you really need to host your tournament on tournia.net, please contact info a t tournia.net
These are the files that are hosted on Tournia.net. Feel free to use it, but read the LICENSE file when using the code for other purposes than personal use. Also, if you find issues, please open an issue in this repository, and if you already know how to fix it, create a pull request.
The Tournia system uses Symfony. There is a lot of official documentation for Symfony available. It is highly recommended to at least go through the quick tour. This explain the basics of Symfony; it's an advanced framework and might seem complicated, but we use a great deal of functionality out of it, and makes development easier and better. If you're having some time left, you can move onto reading the official Symfony2 book.
Heroku deployment is the easiest way to install Tournia. With a few clicks you have new installation running.
If you need to update the environment (with a new Heroku App), you can change the database connection of this new app by changing the
JAWSDB_URL in the Config vars, and refer it to the database in your old app.
It's possible to terminal into the Heroku environment with
heroku run bash -a app_name
The repository files contain a Vagrant file, which can be used to setup a MAMP/WAMP environment quickly. Vagrant is free software which creates a virtual OS, on which the Apache, MySQL and PHP server is installed. Just follow the simple steps:
vagrant upwhich will start your virtual machine.
Some tips for when you've got things working:
vagrant up. You can open the virtual OS with
vagrant ssh. For other commands, see https://docs.vagrantup.com/v2/cli/index.html
vagrant reload --provisionThis runs the bash script (Vagrant_bootstrap.sh) again. You can also destroy the virtual machine, and re-create it by:
There is a Docker compose configuration available. Run
$ docker-compose build $ docker-compose up
You can stop the container with Ctrl-C. Tournia is available on http://localhost/app_dev.php (login with tournia/pocahontas)
To clean up the docker images, run
docker-compose rm. To execute a command in the container, run
docker-compose exec web bash.
By now you should be able to see http://192.168.50.4/app.php/ and have a fully working website. The data is used from the file testDump.sql, which is imported in the MySQL database. You can check this at http://192.168.50.4/phpmyadmin/ in the tournament table.
php app/console assetic:dump --env=prod --no-debug
This command can also be useful when changing SASS files, because Assetic might not re-generate the corresponding CSS files. In that case, you can also delete the cache files in app/cache/dev/*
It is advisable to create a symbolic link (shortcut), with the command
php app/console assets:install public_html --symlink
This is useful because if you change something in src/TS/*Bundle/Resources/public, it will automatically be changed in public_html/bundles/
When changing from one branch to the other, you might run into some problems.
php app/console doctrine:migrations:migrate (-n)
php app/console assets:install public_html (--symlink)
Besides using the bundles from the Symfony (and other vendors) software, we have also our own bundles:
Our system has a lot of entities. Every entity is a file in the src/TS/Bundle/Entity/ folder and corresponds to a table in the database. The entities are constantly changing, but below is a general overview of the structure of the system.
To create a new migration:
php app/console doctrine:migrations:generate (or possibly
php app/console doctrine:migrations:diff) and
php app/console doctrine:migrations:migrate
php app/console gos:websocket:server --port 8080 to start accepting websocket connections for Match Control.