diff options
-rw-r--r-- | Dockerfile | 5 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rwxr-xr-x | start.sh | 8 |
3 files changed, 14 insertions, 1 deletions
@@ -10,8 +10,11 @@ ADD package.json /app/code/package.json | |||
10 | ADD src /app/code/src | 10 | ADD src /app/code/src |
11 | ADD app.js /app/code/app.js | 11 | ADD app.js /app/code/app.js |
12 | ADD app /app/code/app | 12 | ADD app /app/code/app |
13 | ADD start.sh /app/code/start.sh | ||
13 | RUN npm install | 14 | RUN npm install |
14 | 15 | ||
16 | RUN npm install -g forever | ||
17 | |||
15 | EXPOSE 3000 | 18 | EXPOSE 3000 |
16 | 19 | ||
17 | CMD [ "nodejs", "app.js"] | 20 | CMD [ "/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 | |||
3 | set -eu | ||
4 | |||
5 | export NODE_ENV=production | ||
6 | |||
7 | forever start --workingDir /app/code app.js | ||
8 | forever logs -f 0 \ No newline at end of file | ||