mkdir ~/Envs/sds_vrfy
pyvenv ~/Envs/sds_vrfy
source ~/Envs/sds_vrfy/bin/activate
pg_ctl start -D /usr/local/var/postgres
psql -l
//lists databasescreateuser <username>
createdb -O <username> <dbname>
redis-server
redis-cli ping
celery --app=vrfy.celery:app worker --loglevel=DEBUG
celery -A vrfy flower
, which starts a simple webserver so you can monitor the workers and tasksUse these names in the settings file
sudo apt install python3-pip virtualenv libpq-dev python-dev postgresql postgresql-client supervisor chromium
psql -c "CREATE ROLE vrfy_dev_usr WITH PASSWORD 'pass'; ALTER ROLE vrfy_dev_usr with LOGIN; GRANT ALL PRIVILEGES ON DATABASE vrfy_dev to vrfy_dev_usr;"
and then psql -c "CREATE DATABASE vrfy_dev OWNER vrfy_dev_usr;"
adduser vrfy
and then add it to the sudo and docker groups: sudo usermod -aG sudo,docker vrfy
cd ~; virtualenv --python=/usr/bin/python3.5 py3_env; source py3_env/bin/activate
pip3 install -r requirements.txt
this command installs the python libs for this projectsudo npm install -g bower
bower install
this command installs the bower components required for this projectmkdir /home/vrfy/vrfy/logging/
python3 manage.py collectstatic
this collects static files from the static folders and the bower_components directories (as per vrfy/settings.py).python3 manage.py migrate
sudo npm install -g grunt-cli
grunt
this command creates the files & folder necessary (e.g course/static/course)python3 manage.py createsuperuser
python3 manage.py gruntserver
this is a custom command that integrates the task runner grunt with the traditional runserver command provided by django (see [https://lincolnloop.com/blog/simplifying-your-django-frontend-tasks-grunt/] if you're curious). Grunt compiles all .scss files into .css, concatenates all .js files and puts them into the /static/ subdirectory of the course app. Whenever a change is made to a .js file in course/js (and respectively, a .scss file in course/sass) grunt recompiles everything and the changes are reflected in the browser (at localhost:8000). Of course, you can always use python3 manage.py runserver
, which runs the server using localhost at port 8000. python3 manage.py makemigrations <app_name>
python3 manage.py migrate
vrfy/settings.py
change TANGO_ADDRESS
to the Tango server's address, TANGO_KEY
to one of the keys for the server and TANGO_COURSELAB_DIR
to the directory where Tango will store its courselabssudo python restful-tango/server.py
to make sure it has permission to edit the courselabs