diff --git a/docker-files/api_base/Dockerfile b/docker-files/api_base/Dockerfile index 889513272..a9ed15d05 100644 --- a/docker-files/api_base/Dockerfile +++ b/docker-files/api_base/Dockerfile @@ -1,17 +1,21 @@ # # api_base Dockerfile -# Author anandkumarpatel -## +# # Pull base image. FROM registry.runnable.com/runnable/base:latest -WORKDIR / +# Node.js @ 10.28 +$ npm @ 2.1.8 + +# install required packages +# lsof: required for open file monitoring -# Installing Node.js -RUN wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz -RUN tar xvf node-v*.tar.gz -WORKDIR node-v0.10.29/ -RUN ./configure -RUN make -j16 -RUN make install +RUN wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz \ + && tar xvf node-v*.tar.gz \ + && cd node-v0.10.28 \ + && ./configure \ + && make -j16 \ + && make install \ + && npm install -g npm@2.1.8 \ + && apt-get install lsof \ No newline at end of file diff --git a/lib/routes/instances/index.js b/lib/routes/instances/index.js index ff426564a..700d9ed4c 100644 --- a/lib/routes/instances/index.js +++ b/lib/routes/instances/index.js @@ -23,7 +23,6 @@ var github = require('middlewares/apis').github; var docker = require('middlewares/apis').docker; var mavis = require('middlewares/apis').mavis; var sauron = require('middlewares/apis').sauron; -var isInternal = require('middlewares/is-internal-request.js'); var runnable = require('middlewares/apis').runnable; var hosts = require('middlewares/redis').hosts; var userStoppedContainer = require('middlewares/redis').userStoppedContainer; @@ -562,11 +561,12 @@ app.post('/instances/:id/actions/copy', ); /** Creates a container (instance.container) from the current instance build (instance.build) - * @event PUT rest/instances/:id/a + - * @event PUT rest/instances/:id/a + + * THIS IS ALSO USED INTERNALLY + + * @event POST rest/instances/:id/actions/redeploy * @params id: instance id */ app.post('/instances/:id/actions/redeploy', - isInternal, findInstance, flow.or( me.isOwnerOf('instance'), diff --git a/package.json b/package.json index 57bb04367..283e45bd3 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,11 @@ "sauron": "git+ssh://git@github.com:codenow/sauron#v0.0.8", "server-destroy": "^1.0.0" }, - "engine": "node >= 0.10.5", + "engineStrict": true, + "engine": { + "node" : "0.10.28", + "npm" : "2.1.8" + }, "scripts": { "test-watch": "echo use 'bdd-watch' or 'unit-watch'", "_bdd": "npm run clear; NODE_PATH=./lib NODE_ENV=test lab -v -l -m 200 -e test",