Skip to content

Commit

Permalink
feat(package): Adds Semantic Release, Greenkeeper, and Docker.
Browse files Browse the repository at this point in the history
Merges PR #5
  • Loading branch information
ryasmi authored Sep 27, 2017
2 parents 156ab30 + 1eba324 commit 0d9647d
Show file tree
Hide file tree
Showing 6 changed files with 2,991 additions and 129 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,38 @@ language: node_js
node_js: node
sudo: false

notifications:
email: false

env:
- MONGODB=3.2.13

install:
before_install:
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
- tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
- npm install
- npm install -g greenkeeper-lockfile@1

before_script:
- mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/data --logpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/mongodb.log --fork
- greenkeeper-lockfile-update
- npm prune

script:
- npm run build
- npm run lint -- -c tslint.travis.json
- docker build -t "$DOCKER_REPO_SLUG:$TRAVIS_BRANCH" .;

after_script:
- pkill mongod

after_success:
- npm prune --production
- npm run semantic-release
- greenkeeper-lockfile-upload
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker images;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push $DOCKER_REPO_SLUG:$TRAVIS_BRANCH;
fi
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:8
ENV NPM_CONFIG_LOGLEVEL warn
WORKDIR /usr/src/app

COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm install --production
RUN npm prune
COPY dist dist

EXPOSE 80
CMD ["npm", "start"]
Loading

0 comments on commit 0d9647d

Please sign in to comment.