Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize / Travis #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/.git
/.env

5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- '10'
script:
- npm run lint
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:10

ENV NODE_ENV production

# run CI first (caching)
COPY package-lock.json package.json /usr/src/app/
WORKDIR /usr/src/app
RUN npm ci

# VOLUMEs here
EXPOSE 3000

# copy actual app
COPY . /usr/src/app/
CMD npm start

# Local Variables:
# docker-image-name: "unicode-pr-check"
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,14 @@ GITHUB_APP_PEM_BLOB=LS0tLS1...
GITHUB_OAUTH_CLIENT_ID=xxxxxxxxxx
GITHUB_OAUTH_CLIENT_SECRET=xxxxxxxxxx
```

## Docker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go into the "Quick Start" section that talks about the two existing ways to run the app: directly or via GCP Cloud Function.


(Experimental)

`docker build -t jira-github-pr-check .`
`docker run --rm -v $(pwd)/.env:/usr/src/app/.env:ro -p 3000:3000 jira-github-pr-check`

## LICENSE

See [LICENSE](./LICENSE)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"url": "https://github.com/unicode-org/jira-github-pr-check"
},
"scripts": {
"lint": "eslint ."
"lint": "eslint .",
"start": "node app.js"
},
"author": "Shane F. Carr",
"license": "Unicode-DFS-2016",
Expand Down