It's recommended to use virtual environment.
Installation virtualenv for Python 3.6
sudo apt-get install python3-venv
create new virtual environment
python3 -m venv ./tmp/venv
active it
. ./tmp/venv/bin/activate
It will install all necessary python libraries
make setup/dev
Test it
make test/dev
How to use it
Supervisor
Setup for production
Installing RabbitMQ on Ubuntu
sudo apt-get install -y erlang
sudo apt-get install rabbitmq-server
Enable and start the RabbitMQ service:
sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server
Check the status to make sure everything is running smooth:
sudo systemctl status rabbitmq-server
Open file SZR/settings/my_social_keys.py and set CELERY_BROKER_URL to point your broker url. For example 'amqp://localhost:5672'.
celery worker -A SZR -l info
celery beat -A SZR -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
Installation
sudo apt-get install supervisor
Change files config/supervisor_celery.sample and config/supervisor_celerybeat.sample to point your local repository and copy them to location /etc/supervisor/conf.d/
Reread the configuration and add the new process
(you need to do this every time functions are changed)
sudo supervisorctl reread
sudo supervisorctl update
make run/dev
Instruction for Ubuntu you can find here but you need to install gitlab-ce version.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo EXTERNAL_URL="http://localhost" apt-get install gitlab-ce
Login in GitLab with admin account.
Go to gitlab_url/admin/applications and add new application.
In Name write whatever you want.
In Redirect URI write url to authorisation url in your application for example http://localhost:1234/auth/complete/gitlab/
Check Trusted, api and read_user.
Next open file SZR/settings/my_social_keys.py and copy Application ID to SOCIAL_AUTH_GITLAB_KEY,
Secret to SOCIAL_AUTH_GITLAB_SECRET and set SOCIAL_AUTH_GITLAB_API_URL to point your gitlab url.