aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--package.json2
-rwxr-xr-xstart.sh8
3 files changed, 14 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 87ed80d..c82a944 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,8 +10,11 @@ ADD package.json /app/code/package.json
10ADD src /app/code/src 10ADD src /app/code/src
11ADD app.js /app/code/app.js 11ADD app.js /app/code/app.js
12ADD app /app/code/app 12ADD app /app/code/app
13ADD start.sh /app/code/start.sh
13RUN npm install 14RUN npm install
14 15
16RUN npm install -g forever
17
15EXPOSE 3000 18EXPOSE 3000
16 19
17CMD [ "nodejs", "app.js"] 20CMD [ "/app/code/start.sh" ]
diff --git a/package.json b/package.json
index d10b733..99440c2 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,8 @@
33 "morgan": "^1.6.0", 33 "morgan": "^1.6.0",
34 "multiparty": "^4.1.2", 34 "multiparty": "^4.1.2",
35 "passport": "^0.2.2", 35 "passport": "^0.2.2",
36 "passport-ldapjs": "^1.0.2",
37 "readline-sync": "^1.2.19",
36 "safetydance": "0.0.16", 38 "safetydance": "0.0.16",
37 "superagent": "^1.2.0", 39 "superagent": "^1.2.0",
38 "underscore": "^1.8.3" 40 "underscore": "^1.8.3"
diff --git a/start.sh b/start.sh
new file mode 100755
index 0000000..84ea5ef
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,8 @@
1#!/bin/bash
2
3set -eu
4
5export NODE_ENV=production
6
7forever start --workingDir /app/code app.js
8forever logs -f 0 \ No newline at end of file