-
Notifications
You must be signed in to change notification settings - Fork 17
Upgrade
The process for upgrading TIOJ depends on how you installed it.
Upgrading Dockerized TIOJ is very simple:
- Pull the
tiojrepo to the desired version. - Run
docker compose up -d --build - Done!
The general process for upgrading a direct-installed TIOJ (using the installation script) is:
- Pull the
tioj(andtioj-judgeif instructed in the release notes) repo to the desired version. - (Only if
tioj-judgeis upgraded) Runninja && sudo ninja installunder thebuild/directory of thetioj-judgerepo. - (Only for major / minor releases) Follow the instruction in the release notes. Generally it will be some of the operations listed below, but some versions may have special upgrade steps.
- Run
sudo systemctl restart nginx && sudo systemctl restart tioj-judgeto restart the services - Done!
Run yarn install --frozen-lockfile in the tioj repo. After running this, follow the next section to regenerate static assets.
Run RAILS_ENV=production rails assets:precompile in the tioj repo.
Run RAILS_ENV=production rails db:migrate in the tioj repo.
Run bundle install in the tioj repo.
Run the following commands to upgrade Ruby using RVM:
rvm install [version]
rvm alias create default [version]
rvm use [version]
bundle install # should be run in the `tioj` repoAfter upgrading Ruby, follow the next section to re-install NGINX. Also, you can optionally remove the old Ruby version using rvm uninstall [old-version].
Run the following command to upgrade or reinstall NGINX:
rvmsudo passenger-install-nginx-module --force-colors --auto --auto-download --languages rubyThe command will output something like this at the end:
passenger_root /home/tioj/.rvm/gems/ruby-[version]/gems/passenger-[version];
passenger_ruby /home/tioj/.rvm/gems/ruby-[version]/wrappers/ruby;
Use these to replace the similar two lines in /opt/nginx/conf/nginx.conf.