From e831f1d225928e4b82b5aaf1e5baac43862f7688 Mon Sep 17 00:00:00 2001 From: Tapish Rathore Date: Wed, 20 Sep 2023 15:49:13 +0530 Subject: [PATCH 1/2] Add instructions about oauth and setup --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23abdc5d..0a1c3b2c 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,15 @@ For more information, visit our website at https://vibinex.com/. To run Vibi-DPU locally: 1. Generate public url using ngrok - `ngrok http 3000` -2. Fire up cloud sql proxy - `./cloud-sql-proxy --port 5432 vibi-test-394606:asia-south1:test-db` -3. Change url in team-monitor-website in .env.local - `NEXTAUTH_URL=https://example.ngrok-free.app` -4. Start team-monitor-website - `npm run dev` -5. Build vibi-dpu, go to vibi-dpu/vibi-dpu and run - `cargo build` -6. Go up to the root directory of vibi-dpu - `cd ../` -7. **Build the Docker image**: In the root directory of the project, run the following command to build a Docker image with the name "dpu". +2. Paste this in OAuth consumers in callback_url field. +3. Clone [team-monitor-webiste](https://github.com/Alokit-Innovations/team-monitor-website/) locally. +4. Paste the client id and secret in team-monitor-wesite in .env.local in root directory. Also use them in the docker command below. +5. Fire up cloud sql proxy - `./cloud-sql-proxy --port 5432 vibi-test-394606:asia-south1:test-db` +6. Change url in team-monitor-website in .env.local - `NEXTAUTH_URL=https://example.ngrok-free.app` +7. Start team-monitor-website - `npm run dev` +8. Build vibi-dpu, go to vibi-dpu/vibi-dpu and run - `cargo build` +9. Go up to the root directory of vibi-dpu - `cd ../` +10. **Build the Docker image**: In the root directory of the project, run the following command to build a Docker image with the name "dpu". ```bash docker build \ @@ -32,11 +35,14 @@ To run Vibi-DPU locally: --build-arg SERVER_URL=your-server-url \ -t dpu . ``` -8. **Run the Docker container**: After building the image, you can run it using the following command. +11. **Run the Docker container**: After building the image, you can run it using the following command. ```bash docker run dpu ``` +12. For bitbucket, replace your url in this url and paste it on your browser and visit it. If you are using ngrok, you might get a "visit site" ngrok welcome page. Click and visit site. Grant any permissions asked from your user to bitbucket. Example URL - `https://bitbucket.org/site/oauth2/authorize?response_type=code&client_id=raFykYJRvEBHPttQAm&redirect_uri=https%3A%2F%2F5bef-171-76-86-89.ngrok-free.app%2Fapi%2Fbitbucket%2Fcallbacks%2Finstall&scope=repository%20pullrequest%20pullrequest:write%20webhook%20account%20repository:write`. You only need to replace the `5bef-171-76-86-89.ngrok-free.app` part with your own ngrok url instead of generating a new formatted url. +13. This would start the "setting up" part of dpu, where it calls bitbucket apis and collects repo info, user info, workspace info and pr info. +14. Next begin your testing. For instance, if you push to a PR, you should be able to see logs in next server, in dpu and see the required actions being performed on the PR. ## Contributing From eb01845b626925bf03ac93e2e82007a4eac53ba3 Mon Sep 17 00:00:00 2001 From: Tapish Rathore Date: Wed, 20 Sep 2023 16:15:41 +0530 Subject: [PATCH 2/2] Add what happens on port 3000 in instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a1c3b2c..4c656d68 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ For more information, visit our website at https://vibinex.com/. To run Vibi-DPU locally: -1. Generate public url using ngrok - `ngrok http 3000` +1. Generate public url using ngrok - `ngrok http 3000`. We will run our next server locally on port 3000 in later steps. 2. Paste this in OAuth consumers in callback_url field. 3. Clone [team-monitor-webiste](https://github.com/Alokit-Innovations/team-monitor-website/) locally. 4. Paste the client id and secret in team-monitor-wesite in .env.local in root directory. Also use them in the docker command below.