Skip to content

Commit e50a0f3

Browse files
chore: docker deployment using dockerhub image (#36)
1 parent 8dae3f6 commit e50a0f3

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ A Node.js server for GitHub app to assist external contributors and save maintai
44

55
## Roadmap
66

7-
- [x] When an external contributor (not the internal team) raises a PR, post a comment to sign CLA and label PR `Pending CLA``
8-
- [x] On signing CLA, remove `Pending CLA`` label and never ask that user to sign the CLA again on any of our repo in future [DONE]
9-
- [x] On `rudder-transformer`` PR merge, post a comment to raise PR in `integrations-config`
10-
- [ ] On `integrations-config`` PR merge, psot a comment to join Slack's product-releases channel to get notified when that integration goes live
7+
- [x] When an external contributor (not the internal team) raises a PR, post a comment to sign CLA and label PR `Pending CLA`
8+
- [x] On signing CLA, remove `Pending CLA` label and never ask that user to sign the CLA again on any of our repo in future
9+
- [x] On `rudder-transformer` PR merge, post a comment to raise PR in `integrations-config`
10+
- [ ] On `integrations-config` PR merge, psot a comment to join Slack's product-releases channel to get notified when that integration goes live
1111

1212
## Requirements
1313

@@ -34,12 +34,12 @@ A Node.js server for GitHub app to assist external contributors and save maintai
3434

3535
1. [Register a GitHub app](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) for your GitHub organization. Make sure to activate the webhook with webhook url `https://YOUR_WEBSITE/api/webhook` in your app with a secret. Enable Permissions & Events as you may need, at minimum pull_request and issue related events should be enabled.
3636
2. Install your GitHub app in all the repos where you need this app.
37-
3. Clone this repo
37+
3. Clone this repo OR download the [`build/docker-compose.yml`](./build/docker-compose.yml) to install via dockerhub image
3838
4. Update `docker-compose.yml` environment variables with the details received from the step 2
3939
> To convert GitHub App's private key to base64, use this command - `openssl base64 -in /path/to/original-private-key.pem -out ./base64EncodedKey.txt -A`
4040
5. Run `docker-componse build` to build the service
4141
6. Run `docker-compose up` to create and start the container
42-
7. Test by visiting `http://localhost:3000`
42+
7. Test by visiting `http://localhost:3000` OR whatever `WEBSITE_ADDRESS` environment variable you've configured
4343

4444
## Usage
4545

@@ -60,4 +60,4 @@ by major cloud providers:
6060
[Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node?tabs=windows),
6161
[AWS Secrets Manager](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-secrets-manager/),
6262
[Google Secret Manager](https://cloud.google.com/nodejs/docs/reference/secret-manager/latest),
63-
etc.
63+
etc.

build/docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3'
2+
services:
3+
app:
4+
image: gitcommitshow/rudder-github-app
5+
ports:
6+
- "3000:3000"
7+
environment:
8+
- NODE_ENV=production
9+
- PORT=3000
10+
- APP_ID=11111 # Replace this with your app id. You'll need to create a github app for this: https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app
11+
- GITHUB_APP_PRIVATE_KEY_BASE64=your_github_app_private_key_base64_encode # Replace this. First, get the private key from `GitHub Settings > Developer settings > GitHub Apps > {Your GitHub App} > Private Keys > Click(Generate Private Key)`. And then encode it to base64 using this command: `openssl base64 -in /path/to/original-private-key.pem -out ./base64EncodedKey.txt -A`
12+
- WEBHOOK_SECRET=the_secret_you_configured_for_webhook_in_your_github_app # Replace this
13+
- WEBSITE_ADDRESS=http://localhost:3000 # Replace this with your website domain name. It is recommended to use https, make sure to forward your your traffic on 443 to 3000 port(or whatever you configured earlier in environment.PORT) using reverse proxy such as nginx.

0 commit comments

Comments
 (0)