Skip to content

Commit 3b6ae96

Browse files
authored
Merge pull request #32 from chadfawcett/docker-support
Docker support
2 parents 19f304d + 94f3156 commit 3b6ae96

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
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"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mailhound",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Mailhound is a simple server side script for receiving form posts and emailing the form values.",
55
"keywords": [
66
"post",

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)