Skip to content

Commit 8870567

Browse files
author
nishant
committed
dockerfile added
1 parent de81432 commit 8870567

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node
2+
3+
ENV TINI_VERSION v0.18.0
4+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
5+
RUN chmod +x /tini
6+
ENTRYPOINT ["/tini", "--"]
7+
8+
COPY /. .
9+
RUN npm install
10+
11+
CMD ["node","app.js"]

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ app.get('/', function(req, res){
77
res.write(JSON.stringify(cities));
88
res.end();
99
});
10-
10+
app.get('/health', (req, res) => res.send({"status": "OK", "time": new Date()}))
1111
var port = process.env.PORT || 8080;
1212
app.listen(port);
1313

0 commit comments

Comments
 (0)