Skip to content

Commit 0d9647d

Browse files
authored
feat(package): Adds Semantic Release, Greenkeeper, and Docker.
Merges PR #5
2 parents 156ab30 + 1eba324 commit 0d9647d

File tree

6 files changed

+2991
-129
lines changed

6 files changed

+2991
-129
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.travis.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,38 @@ language: node_js
22
node_js: node
33
sudo: false
44

5+
notifications:
6+
email: false
7+
58
env:
69
- MONGODB=3.2.13
710

8-
install:
11+
before_install:
912
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
1013
- tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
1114
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
12-
- npm install
15+
- npm install -g greenkeeper-lockfile@1
1316

1417
before_script:
1518
- mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
1619
- ${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
20+
- greenkeeper-lockfile-update
21+
- npm prune
1722

1823
script:
1924
- npm run build
2025
- npm run lint -- -c tslint.travis.json
26+
- docker build -t "$DOCKER_REPO_SLUG:$TRAVIS_BRANCH" .;
2127

2228
after_script:
2329
- pkill mongod
30+
31+
after_success:
32+
- npm prune --production
33+
- npm run semantic-release
34+
- greenkeeper-lockfile-upload
35+
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
36+
docker images;
37+
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
38+
docker push $DOCKER_REPO_SLUG:$TRAVIS_BRANCH;
39+
fi

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:8
2+
ENV NPM_CONFIG_LOGLEVEL warn
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json package.json
6+
COPY package-lock.json package-lock.json
7+
RUN npm install --production
8+
RUN npm prune
9+
COPY dist dist
10+
11+
EXPOSE 80
12+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)