add metrics and sample node.js function

This commit is contained in:
Alex
2016-12-22 23:09:44 +00:00
parent 6073cd79f6
commit 2b9a1c10e4
6 changed files with 40 additions and 12 deletions

View File

@ -0,0 +1,9 @@
FROM alpine:latest
RUN apk --update add nodejs
COPY ./fwatchdog /usr/bin/
COPY package.json .
COPY main.js .
RUN npm i
ENV fprocess="node main.js"
CMD ["fwatchdog"]

3
sample-functions/main.js Normal file
View File

@ -0,0 +1,3 @@
'use strict'
let os = require('os');
console.log(os.platform(), os.arch(), os.cpus(), os.uptime(), os.userInfo());

View File

@ -0,0 +1,12 @@
{
"name": "sample-functions",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}