AioQuiz is stand alone opensource application for conducting, managing and monitoring the course of programming workshops.
It is written in Python using asynchronous framework Sanic, PostgresSQL and AngularJS
apt-get install python3-dev gcc
- Python 3.5+
- PostgresSQL (instructions below)
python3.5 -m pip install -r requirements
-
apt-get update <br>
-
sudo apt-get install postgresql postgresql-contrib
-
sudo adduser aioquiz
-
sudo -u postgres createuser --interactive
-
sudo -u postgres createdb aioquizdb
-
sudo -u postgres psql
-
alter user aioquiz with encrypted password '<password>';
-
grant all privileges on database aioquizdb to aioquiz;
- Create config_dev or config_prod in config dir basing on config/template.py
- Edit bottom of bootstrap.py
- Edit admin adding function in bootstrap.py
python3.5 bootstrap.py
You may need to run it more than once.
npm install
./build_front.sh
python3.5 aioquiz.py
https://certbot.eff.org/#ubuntuxenial-nginx
:::bash
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
or (no nginx)
sudo certbot certonly
Cert refresh for nginx:
sudo certbot renew --nginx
Add config_scripts/aioquiz_backup.sh to /usr/local/bin/aioquiz_backup.sh
Add config_scripts/logrotate_aioquizdb.conf to /etc/logrotate.d/aioquizdb.conf
16 10 * * * /usr/local/bin/aioquiz_backup.sh 2>&1 >> /var/log/aioquiz_backup.log
sudo -u postgres psql aioquizdb < infile