SurveyBot for feedback and suggestions for exercises in lectures. Project for TDT4140.
- Python3
- RabbitMQ-server
-
Download the source code.
-
Install the required software.
With macOS/Homebrew
$ brew install python3 $ brew install rabbitmq
Remember to put the RabbitMQ PATH in .bash_profile or similar
PATH=$PATH:/usr/local/sbin
With apt-get
$ apt-get install python3 $ apt-get install rabbitmq-server
-
Install required python modules from curri/
$ pip3 install -r requirements.txt
-
Create email_settings.py file in curri/mysite/mysite/
EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.example.com' EMAIL_HOST_USER = 'email@example.com' EMAIL_HOST_PASSWORD = 'password' EMAIL_PORT = 587
-
Add mysite_uwsgi.ini file to curri/mysite/
# mysite_uwsgi.ini file [uwsgi] # Django-related settings # the base directory (full path) chdir = # TODO # Django's wsgi file module = mysite.wsgi # the virtualenv (full path) # ignore if not using virtualenv home = # TODO # process-related settings # master master = true # maximum number of worker processes processes = 10 http-socket = [::]:80 vacuum = true
-
Migrate databases in curri/mysite
$ python3 manage.py migrate
-
Start Celery and RabbitMQ in their own terminal
$ sudo rabbitmq-server
$ celery -A mysite worker -l info
-
Run the server
$ cd curri/mysite/ $ sudo uwsgi --ini mysite_uwsgi.ini