more files
This commit is contained in:
3
nodejs/kubia/Dockerfile
Normal file
3
nodejs/kubia/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM node:7
|
||||
ADD app.js /app.js
|
||||
ENTRYPOINT [ "node", "app.js" ]
|
||||
16
nodejs/kubia/app.js
Normal file
16
nodejs/kubia/app.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const http = require('http');
|
||||
const os = require('os');
|
||||
|
||||
console.log('Kubia server starting ...');
|
||||
|
||||
var handler = function(request, response){
|
||||
console.log('Recieved a request from ' + request.connection.remoteAddress);
|
||||
console.log(request);
|
||||
response.writeHead(200);
|
||||
response.end("You have hit " + os.hostname() + '\n');
|
||||
console.log(response);
|
||||
};
|
||||
|
||||
var www = http.createServer(handler);
|
||||
|
||||
www.listen(8080);
|
||||
17
nodejs/kubia/kubia-manual.json
Normal file
17
nodejs/kubia/kubia-manual.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Pod",
|
||||
"metadata": {
|
||||
"name": "kubia-manual"
|
||||
},
|
||||
"spec": {
|
||||
"containers": [{
|
||||
"image": "brgirgis/kubia",
|
||||
"name": "kubia",
|
||||
"ports": [{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
3
nodejs/kubia/kubia-manual.yaml
Normal file
3
nodejs/kubia/kubia-manual.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user