Skip to content

Commit

Permalink
Add dockerfile, prep for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed Aug 5, 2020
1 parent 5866045 commit 563d006
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env*
node_modules
*.pem
.env*
20 changes: 20 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: docker
on:
push:
jobs:
docker:
name: docker
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: build-push
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ env.GITHUB_REPOSITORY }}
tag_with_ref: true
push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' }}
always_pull: true
add_git_labels: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
npm-debug.log
*.pem
.env
.env*
package-lock.json
config/kubernetes/*/secrets/*
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:10

WORKDIR /usr/src/app
COPY package*.json yarn.* ./

RUN yarn
COPY . .
ENV PORT 8888
EXPOSE 8888
CMD [ "node_modules/.bin/probot", "run", "index.js" ]
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const Raven = require('raven')
Raven.config(process.env.SENTRY_DSN).install()
if (process.env.SENTRY_DSN) {
const Raven = require('raven')
Raven.config(process.env.SENTRY_DSN).install()
}

const Yamburger = require('./lib/yamburger')

module.exports = (robot) => {
Expand Down
6 changes: 0 additions & 6 deletions script/deploy

This file was deleted.

0 comments on commit 563d006

Please sign in to comment.