Skip to content

Commit 4ed5cf5

Browse files
committed
Add Dockerfile
1 parent 19f304d commit 4ed5cf5

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:4.2
2+
3+
EXPOSE 8000
4+
5+
WORKDIR /usr/src/app
6+
COPY . /usr/src/app
7+
RUN npm install
8+
9+
CMD ["node", "server.js"]

server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,9 @@ var server = app.listen(config.get('PORT') || 8000, function () {
8989

9090
console.log('mailhound listening at http://%s:%s', host, port);
9191
});
92+
93+
process.on('SIGTERM', function() {
94+
server.close(function() {
95+
process.exit(0)
96+
})
97+
})

0 commit comments

Comments
 (0)