Skip to content

Setting up development enviorment

Adam Schubert edited this page Mar 23, 2019 · 2 revisions

Install required packages

apt install python3-virtualenv virtualenv git redis rabbitmq

Clone project (you may clone your own fork)

git clone [email protected]:Salamek/gitlab-tools.git

Cd into directory :)

cd gitlab-tools

Create new virtualenv

virtualenv -p /usr/bin/python3 venv

Activate created virtualenv

source ./venv/bin/activate

In activated virtualenv, install project requirements

pip install -r requirements.txt

Test installation

python manage.py

Should output command line options help

Configuration

Create config.yml next to the manage.py (or in /etc/gitlab-tools/config.yml) with this content:

Configure GitLab API keys

GITLAB_APP_ID: Gitlab_app_id
GITLAB_APP_SECRET: Gitlab_app_secret
GITLAB_URL: Gittlab_url

Configure database (if you want)

By default SQLite database is used for unconfigured installation located at /tmp/gitlab-tools.db If you want to use different database (Like production PostgreSQL)

SQLALCHEMY_DATABASE_URI: postgresql://gitlab-tools:[email protected]/gitlab-tools

Create development database

python manage.py create_all
python manage.py migrations stamp head

Now you should be ready to run development webserver

python manage.py server

And run celery tasks

python manage.py celeryworker