Skip to content

Commit

Permalink
use octo-service
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBild committed Jul 17, 2015
1 parent 7d03264 commit 0604442
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM node:0.10-onbuild

ADD . /
WORKDIR /
RU npm install -g forever
RUN npm install -g subkit-microservice

RUN npm install -g forever
RUN npm install -g subkit-microservice@0.2.75
RUN subkit update service
RUN subkit install service dashboard,file

ENTRYPOINT ["subkit", "run", "service"]
ENTRYPOINT subkit start service
10 changes: 9 additions & 1 deletion service/files/shares/shares.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,13 @@
"DELETE": [
"anonymous"
]
}
},
"/files": {
"GET": [
"anonymous"
],
"POST": [],
"PUT": [],
"DELETE": []
}
}
6 changes: 3 additions & 3 deletions service/files/statics/instances.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

function find(){
return http
.get('service-template', '/api/ShipyardContainers')
.get('octo-service', '/api/ShipyardContainers')
.then(function(result){
return result.data;
});
Expand All @@ -27,7 +27,7 @@
if(!value || !value.name || !value.version) return $q.reject(new Error('Instance config is invalid'));

return http
.post('service-template', '/api/ShipyardContainers', value)
.post('octo-service', '/api/ShipyardContainers', value)
.then(function(result){
return result.data;
});
Expand All @@ -37,7 +37,7 @@
if(!value) return $q.reject(new Error('Instance ID is missing'));

return http
.delete('service-template', '/api/ShipyardContainers/' + value)
.delete('octo-service', '/api/ShipyardContainers/' + value)
.then(function(result){
return result.data;
});
Expand Down
2 changes: 1 addition & 1 deletion service/files/statics/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

return http
.post('service-template', '/manage/login', null, account.username, account.password)
.post('octo-service', '/manage/login', null, account.username, account.password)
.then(function(){
$location.path('/main');
})
Expand Down
8 changes: 4 additions & 4 deletions service/files/statics/templates.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

function load(name){
return http
.get('service-template', '/stores/images/' + name)
.get('octo-service', '/stores/images/' + name)
.then(function(result){
return result.data.$payload;
});
}

function find(){
return http
.get('service-template', '/stores/images')
.get('octo-service', '/stores/images')
.then(function(result){
return result.data.results.map(function(itm){
return itm.$payload;
Expand All @@ -37,13 +37,13 @@
function create(template){
if(!template || !template.name) return $q.reject(new Error('Template name is missing'));

return http.post('service-template', '/stores/images/' + template.name, template);
return http.post('octo-service', '/stores/images/' + template.name, template);
}

function remove(template){
if(!template || !template.name) return $q.reject(new Error('Template name is missing'));

return http.delete('service-template', '/stores/images/' + template.name);
return http.delete('octo-service', '/stores/images/' + template.name);
}

})
Expand Down
2 changes: 1 addition & 1 deletion service/files/statics/versions.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
function load(name){
if(!name) return $q.reject(new Error('Service name is missing'));
return http
.get('service-template', '/api/DockerRegistryImageVersions?service=' + name)
.get('octo-service', '/api/DockerRegistryImageVersions?service=' + name)
.then(function(result){
return result.data.sort();
});
Expand Down

0 comments on commit 0604442

Please sign in to comment.