Skip to content

Commit

Permalink
dockerized, added release
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamqweasd committed Feb 13, 2017
1 parent fe0836d commit 8551e84
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
sudo: required
services:
- docker
env:
global:
# Ensure the install happens without prompts
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
language: node_js
node_js:
- "6"
- '6'
before_install:
- echo "Cloudboost Tutorial"
install:
- npm install
- npm install
after_success:
# Build Docker Images
- docker build -t cloudboost/tutorial:2.0.$TRAVIS_BUILD_NUMBER .
- docker build -t cloudboost/tutorial:latest .
before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=2.0.$TRAVIS_BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
- git push -q https://[email protected]/CloudBoost/tutorial --tags
- ls -R
deploy:
provider: azure_web_apps
username: "$azure_deployment_user"
password: "$azure_deployment_password"
site: "$azure_deployment_sitename"
provider: releases
api_key: $GH_TOKEN
file: "README.md"
skip_cleanup: true
on:
tags: false
all_branches: true
after_deploy:
# Docker Deploy.
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login --username $DOCKERUSERNAME --password $DOCKERPASSWORD --email $DOCKEREMAIL;
docker push cloudboost/tutorial:2.0.$TRAVIS_BUILD_NUMBER;
docker push cloudboost/tutorial:latest;
fi
branches:
except:
- /^*-v[0-9]/
#Notify Team on Slack
notifications:
slack: cloudboost:gm7nWJDLDtBRyF75VKLKOoMW

28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# CloudBoost Tutorial Dockerfile
#

# Pull base image nodejs image.
FROM node:boron

#Maintainer.
MAINTAINER Nawaz Dhandala <[email protected]>


RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install

# Bundle app source
COPY . /usr/src/app

# Expose ports.
# - 1446: CloudBoost Tutorial
EXPOSE 1446

#Run the app
CMD [ "npm", "start" ]
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "CloudBoostFrontEnd",
"version": "0.1.0",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.14.1",
"cheerio": "^0.19.0",
Expand Down

0 comments on commit 8551e84

Please sign in to comment.