Skip to content

Commit 8c1e8eb

Browse files
committedApr 4, 2022
add dockerfile and update readme
1 parent 195c7f1 commit 8c1e8eb

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
 

‎Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:14-slim
2+
WORKDIR /usr/src/app
3+
COPY package.json package-lock.json ./
4+
RUN npm ci --production
5+
RUN npm cache clean --force
6+
ENV NODE_ENV="production"
7+
COPY . .
8+
CMD [ "npm", "start" ]

‎README.md

+20
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@ There are two options to debug locally.
4646
1. Copy .env-sample to .env and populate with values specific for your GitHub app. [See here for more details](https://probot.github.io/docs/configuration/).
4747
1. From the VSCode `RUN AND DEBUG` menu select `Launch Probot` and click the green arrow to start debugging.
4848

49+
## Docker
50+
51+
```sh
52+
# 1. Run npm install
53+
npm install
54+
55+
# 2. Build container
56+
docker build -t my-probot-app .
57+
58+
# 3. Srouce your .env file
59+
export $(cat .env | xargs)
60+
61+
# 3. Start container
62+
docker run \
63+
-e APP_ID=$APP_ID \
64+
-e PRIVATE_KEY=$PRIVATE_KEY \
65+
-e WEBHOOK_SECRET=$WEBHOOK_SECRET \
66+
my-probot-app
67+
```
68+
4969
## License
5070

5171
[ISC](LICENSE)

0 commit comments

Comments
 (0)
Please sign in to comment.