- install nginx, redis
- clone frontend and backend repo to /var/www
- copy
api
file to/etc/nginx/sites-avaliable
ln -s /etc/nginx/sites-avaliable/api /etc/nginx/sites-enabled/api
rm /etc/nginx/sites-enabled/default
service nginx start
(or restart)- cd repo dir & run setup.sh in repo, which will create apienv first and install needed package (please add to package list if some package missing)
source apienv/bin/activate
gunicorn --workers 3 --bind unix:/tmp/api.sock -m 007 wsgi:app
- for sake of privilige,
chmod 777 /tmp/api.sock
(DO NOT EXECUTE IN PRODUCTION ENVIRONMENT) - start celery server with
celery -A pool worker -c 12
- browse page at localhost