diff --git a/Worker/Dockerfile b/Worker/Dockerfile
index c39dd98..be14092 100644
--- a/Worker/Dockerfile
+++ b/Worker/Dockerfile
@@ -3,10 +3,10 @@ FROM microsoft/dotnet:1.1.0-sdk-projectjson
WORKDIR /dotnetapp
# copy project.json and restore as distinct layers
-COPY project.json .
+ADD project.json .
RUN dotnet restore
# copy and build everything else
-COPY . .
+ADD . .
RUN dotnet build -C Release
ENTRYPOINT ["dotnet", "run", "-C", "Release"]
\ No newline at end of file
diff --git a/store/Dockerfile b/store/Dockerfile
new file mode 100644
index 0000000..c4d3d53
--- /dev/null
+++ b/store/Dockerfile
@@ -0,0 +1,9 @@
+FROM ruby:alpine
+RUN apk add --update build-base
+RUN gem install bundle
+RUN gem install thin
+ADD Gemfile .
+RUN bundle
+ADD . .
+CMD ["bundle", "exec", "thin", "start"]
+EXPOSE 80
\ No newline at end of file
diff --git a/store/Gemfile b/store/Gemfile
index 1f2b6e6..2978655 100644
--- a/store/Gemfile
+++ b/store/Gemfile
@@ -1,3 +1,3 @@
source "https://rubygems.org"
gem 'sinatra'
-gem 'nokogiri'
+gem 'nokogiri'
\ No newline at end of file
diff --git a/ui/Dockerfile b/ui/Dockerfile
new file mode 100644
index 0000000..517584c
--- /dev/null
+++ b/ui/Dockerfile
@@ -0,0 +1,10 @@
+FROM node:boron-wheezy
+RUN npm install -g bower
+ADD package.json .
+RUN npm install
+ADD bower.json
+RUN bower install
+ADD . .
+EXPOSE 3000
+CMD ["npm", "run", "start"]
+
diff --git a/ui/bower.json b/ui/bower.json
index 2ae9977..d1293a4 100644
--- a/ui/bower.json
+++ b/ui/bower.json
@@ -8,6 +8,8 @@
],
"dependencies": {
"rickshaw": "^1.6.0",
- "jquery": "^3.1.1"
+ "jquery": "^3.1.1",
+ "underscore": "^1.8.3",
+ "moment": "^2.17.1"
}
}
diff --git a/ui/package.json b/ui/package.json
index c3623d4..d5e8ea9 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -11,12 +11,13 @@
"test:integration": "mocha --recursive test/integration"
},
"dependencies": {
- "express": "^4.13.3",
- "serve-favicon": "^2.3.0",
- "morgan": "^1.6.1",
- "cookie-parser": "^1.3.3",
"body-parser": "^1.13.3",
- "ejs": "^2.3.1"
+ "cookie-parser": "^1.3.3",
+ "ejs": "^2.3.1",
+ "express": "^4.13.3",
+ "morgan": "^1.6.1",
+ "request": "^2.79.0",
+ "serve-favicon": "^2.3.0"
},
"devDependencies": {
"chai": "^3.5.0",
diff --git a/ui/routes/index.js b/ui/routes/index.js
index e69aa52..dd897e1 100644
--- a/ui/routes/index.js
+++ b/ui/routes/index.js
@@ -1,5 +1,6 @@
var express = require('express');
var router = express.Router();
+var request = require('request');
/* GET home page. */
@@ -7,4 +8,15 @@ router.get('/', function(req, res) {
res.render('index', { title: 'Express' });
});
+router.get('/db', (req, res)=>{
+ // request('http://store/', function (error, response, body) {
+ // if (!error && response.statusCode == 200) {
+ // console.log(body) // Show the HTML for the Google homepage.
+ // }
+ // res.set('Content-Type', 'application/json');
+ // return res.send(200, body);
+ // })
+ res.json([ { date: '2017-01-01 10:01', value: 20 }, { date: '2017-01-01 11:00', value: 60 }]);
+});
+
module.exports = router;
diff --git a/ui/views/index.ejs b/ui/views/index.ejs
index f437aef..3683a15 100644
--- a/ui/views/index.ejs
+++ b/ui/views/index.ejs
@@ -8,7 +8,7 @@
-
+
<% include footer %>