Skip to content

Commit 92b7c12

Browse files
committed
Merge pull request #465 from CodeNow/ASAP-making-redeploy-external
Making instance redeploy external
2 parents be545fe + 059feea commit 92b7c12

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

docker-files/api_base/Dockerfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
#
22
# api_base Dockerfile
3-
# Author anandkumarpatel
4-
##
3+
#
54

65
# Pull base image.
76
FROM registry.runnable.com/runnable/base:latest
87

9-
WORKDIR /
8+
# Node.js @ 10.28
9+
$ npm @ 2.1.8
10+
11+
# install required packages
12+
# lsof: required for open file monitoring
1013

11-
# Installing Node.js
12-
RUN wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz
13-
RUN tar xvf node-v*.tar.gz
14-
WORKDIR node-v0.10.29/
15-
RUN ./configure
16-
RUN make -j16
17-
RUN make install
14+
RUN wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz \
15+
&& tar xvf node-v*.tar.gz \
16+
&& cd node-v0.10.28 \
17+
&& ./configure \
18+
&& make -j16 \
19+
&& make install \
20+
&& npm install -g [email protected] \
21+
&& apt-get install lsof

lib/routes/instances/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ var github = require('middlewares/apis').github;
2323
var docker = require('middlewares/apis').docker;
2424
var mavis = require('middlewares/apis').mavis;
2525
var sauron = require('middlewares/apis').sauron;
26-
var isInternal = require('middlewares/is-internal-request.js');
2726
var runnable = require('middlewares/apis').runnable;
2827
var hosts = require('middlewares/redis').hosts;
2928
var userStoppedContainer = require('middlewares/redis').userStoppedContainer;
@@ -562,11 +561,12 @@ app.post('/instances/:id/actions/copy',
562561
);
563562

564563
/** Creates a container (instance.container) from the current instance build (instance.build)
565-
* @event PUT rest/instances/:id/a
564+
- * @event PUT rest/instances/:id/a
565+
+ * THIS IS ALSO USED INTERNALLY
566+
+ * @event POST rest/instances/:id/actions/redeploy
566567
* @params id: instance id
567568
*/
568569
app.post('/instances/:id/actions/redeploy',
569-
isInternal,
570570
findInstance,
571571
flow.or(
572572
me.isOwnerOf('instance'),

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@
9797
"sauron": "git+ssh://[email protected]:codenow/sauron#v0.0.8",
9898
"server-destroy": "^1.0.0"
9999
},
100-
"engine": "node >= 0.10.5",
100+
"engineStrict": true,
101+
"engine": {
102+
"node" : "0.10.28",
103+
"npm" : "2.1.8"
104+
},
101105
"scripts": {
102106
"test-watch": "echo use 'bdd-watch' or 'unit-watch'",
103107
"_bdd": "npm run clear; NODE_PATH=./lib NODE_ENV=test lab -v -l -m 200 -e test",

0 commit comments

Comments
 (0)