Skip to content

v2.0.0

Compare
Choose a tag to compare
@jdabtieu jdabtieu released this 06 Feb 16:09
· 570 commits to master since this release
4ee83ef

Warning

You will need to modify your webserver configuration. We now use the src/ folder as the root folder. Please see the update instructions.

Changes in this version

  • Move source code to src/
  • Improve page load times
  • Update Bootstrap to 5.0.0
  • Update requests to 2.25.1
  • Update pytest to 6.2.2
  • Update pyjwt to 2.0.1
  • Update cs50 to 6.0.2
  • Add tests
  • Code cleanup
  • Begin to phase out jQuery

Troubleshooting

If the page display is messed up, hit Ctrl+F5 to reload the CSS, which has been changed since v1.5.0

Update instructions

First, you should stop CTFOJ altogether.
Then, enter the repository root folder's parent directory, and the run the following:

# Create backup of private configuration and logs
mkdir backup
cp CTFOJ/database.db backup
cp CTFOJ/database.db.bak backup
cp -r CTFOJ/logs backup
cp -r CTFOJ/dl backup
cp -r CTFOJ/metadata backup
cp CTFOJ/settings.py backup
cp CTFOJ/secret_key.txt backup
# Destroy and recreate CTFOJ
# Warning: if you have any other files in the CTFOJ folder that are not part of CTFOJ, move them into the backup folder
mv CTFOJ CTFOJ_old
git clone https://github.com/jdabtieu/CTFOJ.git
cd CTFOJ/src
# Restore private configuration and logs
cp -r ../../backup/* .

If you had all packages installed in a venv, recreate it.

python3 -m venv .
source bin/activate
pip install -r requirements.txt
deactivate

Then, change any configuration files to point to this now. If you are running CTFOJ as a service, you'll have to edit your CTFOJ.service file. With nginx/Apache/any other web server, you will need to update the configuration files for your WSGI program. Make sure you restart your WSGI service and your web server. Also, if you are running daily_tasks.py (you should be), make sure you update the cron task/whatever task scheduler you use to use the new path.
If everything is working now, you may delete the CTFOJ_old directory.