Skip to content

Commit

Permalink
Merge pull request #28 from 540co/develop
Browse files Browse the repository at this point in the history
Continuous Deployment Updates
  • Loading branch information
killerbgt committed Jun 20, 2015
2 parents c42e9e5 + 7549aa5 commit b97bf4e
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
**/.tmp
**/bower_components
**/*.log
**/dist
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ before_script:
- 'cd client'
- 'npm install'
- 'bower install'
- 'grunt build'
- 'cd ../server'
- 'npm install'
script:
- cd ../client && npm test
- cd ../server && npm test
- cd ../client
- npm test
- cd ../server
- npm test
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# To build:
# 1. Install docker (http://docker.io)
# 2. Checkout source: [email protected]:540co/ads-bpa.git
# 3. Build container: docker build .

FROM node:0.12.4
MAINTAINER 540 Co LLC <[email protected]>

# Environment Variables
ENV SRC_PATH /src/dre
ENV CLIENT_PATH $SRC_PATH/client
ENV SERVER_PATH $SRC_PATH/server

# App
ADD . $SRC_PATH

# Install dependencies
WORKDIR $SRC_PATH
RUN npm install -g bower grunt-cli mocha

# Install client dependencies
WORKDIR $CLIENT_PATH
RUN npm install; bower install --allow-root; grunt build

# Install server dependencies
WORKDIR $SERVER_PATH
RUN npm install

# Expose port 3000 to host
EXPOSE 3000

# Start server
WORKDIR $SERVER_PATH
CMD ["npm", "start"]
5 changes: 5 additions & 0 deletions client/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ module.exports = function (grunt) {
cwd: 'bower_components/bootstrap/dist',
src: 'fonts/*',
dest: '<%= yeoman.dist %>'
}, {
expand: true,
cwd: 'bower_components/font-awesome',
src: 'fonts/*',
dest: '<%= yeoman.dist %>'
}]
},
styles: {
Expand Down
7 changes: 3 additions & 4 deletions client/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
<!-- build:css styles/main.css -->
<link rel="stylesheet" href="styles/bootswatch.css" media="screen">
<link rel="stylesheet" href="styles/bootstrap-switch.min.css" media="screen">
<link rel="stylesheet" href="styles/dre.css" media="screen">

<!-- endbuild -->

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="bower_components/html5shiv/dist/html5shiv.js"></script>
<script src="bower_components/respond/dest/respond.min.js"></script>
<![endif]-->
<!-- endbuild -->



</head>
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
web:
image: 540co/dre:latest
ports:
- "3000:3000"
links:
- mongo
mongo:
image: mongo:3.0.4
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ app.use(cookieParser());

app.use('/api', index);
app.use('/api/reaction', reaction);
app.use('/', express.static(__dirname + '/../client/app'));
app.use('/', express.static(__dirname + '/../client/dist'));

// catch 404 and forward to error handler
app.use(function(req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion server/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var config = {}

config.mongo = "mongodb://localhost:27017/";
config.mongo = "mongodb://mongo:27017/";

module.exports = config;

0 comments on commit b97bf4e

Please sign in to comment.