Skip to content

Latest commit

 

History

History
61 lines (53 loc) · 1.33 KB

File metadata and controls

61 lines (53 loc) · 1.33 KB

Description

This is a gaming quiz service. In it you can both create them and pass them and compete with your friends by score. Try it: http://quiz.glitchdev.space

Install

For app installed sqlite and enabled cookies required

apt-get install git sqlite
git clone https://github.com/gl1tchdev/quiz
cd quiz
python -m venv env
source env/bin/activate
pip install -r requirements.txt

Run

Development

uvicorn main:app

Production

Check this source. Create gunicorn.conf.py:

from multiprocessing import cpu_count
bind = 'unix:/path/to/project/quiz.sock'

workers = cpu_count() + 1

worker_class = 'uvicorn.workers.UvicornWorker'

accesslog = '/path/to/project/access_log'

errorlog =  '/path/to/project/error_log'

Then create daemon like it described in article:

...
ExecStart=/path/to/project/env/bin/gunicorn main:app --config gunicorn.conf.py
...

After follow instruction in source and use bind path in nginx conf