Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdyba/aioquiz
https://github.com/pdyba/aioquiz
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/pdyba/aioquiz
- Owner: pdyba
- License: gpl-3.0
- Created: 2017-02-23T20:14:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T10:59:57.000Z (over 3 years ago)
- Last Synced: 2024-08-01T22:58:38.513Z (4 months ago)
- Language: Vue
- Size: 24.5 MB
- Stars: 21
- Watchers: 4
- Forks: 17
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sanic - aioquiz - workshop registration and execution
README
# AioQuiz
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
## Requirements
* `apt-get install python3-dev gcc`
* Python 3.5+
* PostgresSQL (instructions below)
* `python3.5 -m pip install -r requirements`## install and bootstrap PostgresSQL
* `apt-get update
`
* `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 '';`
* `grant all privileges on database aioquizdb to aioquiz;`## bootstrap DB
1. Create config_dev or config_prod in config dir basing on config/template.py
2. Edit bottom of bootstrap.py
3. Edit admin adding function in bootstrap.py
4. `python3.5 bootstrap.py` You may need to run it more than once.## build front
###### install node modules
`npm install`###### build bundle.js
`./build_front.sh`
###### update bundle hash in static/index.html## run app
`python3.5 aioquiz.py`
## Lets Encrypt Certs:
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`
## backuping DB
### CRON configure
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`### Restoring
sudo -u postgres psql aioquizdb < infile