From 8fb8adb315f484cc8a252f1a6d815eefab5ce955 Mon Sep 17 00:00:00 2001 From: Matias Bordese Date: Mon, 17 Oct 2022 10:45:49 -0300 Subject: [PATCH] Add details about Makefile to DEVELOPER.md --- DEVELOPER.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/DEVELOPER.md b/DEVELOPER.md index 347f7e95..e65f186a 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -2,6 +2,7 @@ - [Code style](#code-style) - [Backend setup](#backend-setup) - [Frontend setup](#frontend-setup) + - [Setup using Makefile](#setup-using-makefile) - [Slack application setup](#slack-application-setup) - [Update drone build](#update-drone-build) - [Troubleshooting](#troubleshooting) @@ -142,6 +143,45 @@ extra_hosts: ``` +### Setup using Makefile + +- Make sure you have `make` installed +- Backend setup: + - Run stateful services: + `$ make docker-services-start` + + (you can change your preferred docker file by defining the `DOCKER_FILE` env variable) + + - Setup environment: + `$ make bootstrap` + + (you can change your preferred directory for your Python virtualenv by defining the `ENV_DIR` env variable) + + - Start the server (this will run bootstrap if needed and apply db migrations): + `$ make run` + + - Start the celery workers: + `$ make start-celery` + + - Start celery beat: + `$ make start-celery-beat` + +- Frontend: + - Build and watch plugin: + `$ make watch-plugin` + + - Generate invitation token: + `$ make manage ARGS="issue_invite_for_the_frontend --override"` + + - Follow instructions above to setup plugin (see steps 5 and 6) + +- Other useful targets: + - `$ make shell` (open Django shell) + - `$ make dbshell` (open DB shell) + - `$ make test` (run tests) + - `$ make lint` (run lint checks) + + ### Slack application setup For Slack app configuration check our docs: https://grafana.com/docs/grafana-cloud/oncall/open-source/#slack-setup