Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker support #32

Merged
merged 2 commits into from
Oct 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:4.2

EXPOSE 8000

WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install

CMD ["node", "server.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mailhound",
"version": "2.0.0",
"version": "2.1.0",
"description": "Mailhound is a simple server side script for receiving form posts and emailing the form values.",
"keywords": [
"post",
Expand Down
6 changes: 6 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ var server = app.listen(config.get('PORT') || 8000, function () {

console.log('mailhound listening at http://%s:%s', host, port);
});

process.on('SIGTERM', function() {
server.close(function() {
process.exit(0)
})
})