+++ .dockerignore
... | ... | @@ -0,0 +1,2 @@ |
1 | +node_modules | |
2 | +npm-debug.log |
+++ .gitignore
... | ... | @@ -0,0 +1,25 @@ |
1 | + | |
2 | +target | |
3 | +build | |
4 | +Thumbs.db | |
5 | +*/Thumbs.db | |
6 | +.ftpsync_settings | |
7 | +npm-debug.log | |
8 | +node_modules | |
9 | +classes | |
10 | +class | |
11 | +.DS_Store | |
12 | +.sonar | |
13 | +.scannerwork | |
14 | +.idea | |
15 | +*.iml | |
16 | +credentials.json | |
17 | +token.json | |
18 | +*.bak | |
19 | +package-lock.json | |
20 | +yarn.lock | |
21 | +.env | |
22 | +.classpath | |
23 | +.project | |
24 | +*.prefs | |
25 | +.vscode |
+++ Dockerfile
... | ... | @@ -0,0 +1,20 @@ |
1 | +# guide from: https://nodejs.org/ko/docs/guides/nodejs-docker-webapp/ | |
2 | +FROM node:10 | |
3 | +# 앱 디렉터리 생성 | |
4 | +WORKDIR /usr/src/app | |
5 | + | |
6 | +# 앱 의존성 설치 | |
7 | +# 가능한 경우(npm@5+) package.json과 package-lock.json을 모두 복사하기 위해 | |
8 | +# 와일드카드를 사용 | |
9 | +COPY package*.json ./ | |
10 | + | |
11 | +RUN npm install | |
12 | +# 프로덕션을 위한 코드를 빌드하는 경우 | |
13 | +# RUN npm ci --only=production | |
14 | + | |
15 | +# 앱 소스 추가 | |
16 | +COPY . . | |
17 | + | |
18 | +EXPOSE 3000 | |
19 | +CMD [ "node", "bin/www" ] | |
20 | + |
+++ deploy.sh
... | ... | @@ -0,0 +1,16 @@ |
1 | +#!/bin/sh | |
2 | +HOME=/home/dev | |
3 | +source $HOME/.zshrc | |
4 | + | |
5 | +git pull; | |
6 | + | |
7 | +SRC=. | |
8 | +DEST=$HOME/local/okdevtv | |
9 | + | |
10 | +cp -rf $SRC/* $DEST | |
11 | + | |
12 | +cd $DEST | |
13 | + | |
14 | +npm install | |
15 | + | |
16 | +pm2 restart all |
--- package.json
+++ package.json
... | ... | @@ -1,21 +1,43 @@ |
1 | 1 |
{ |
2 | 2 |
"name": "okdevtv", |
3 |
- "version": "0.0.0", |
|
3 |
+ "version": "0.2.0", |
|
4 |
+ "main": "bin/www", |
|
5 |
+ "keywords": [], |
|
6 |
+ "author": "kenu", |
|
7 |
+ "license": "BSD", |
|
4 | 8 |
"private": true, |
5 | 9 |
"scripts": { |
6 |
- "start": "node ./bin/www" |
|
10 |
+ "start": "node ./bin/www", |
|
11 |
+ "test:watch": "jest tests/aws-ses.test.js -o --watch" |
|
7 | 12 |
}, |
8 | 13 |
"dependencies": { |
14 |
+ "@babel/polyfill": "^7.4.4", |
|
15 |
+ "aws-sdk": "^2.477.0", |
|
16 |
+ "bcrypt": "^3.0.6", |
|
17 |
+ "body-parser": "^1.18.3", |
|
9 | 18 |
"cookie-parser": "~1.4.4", |
10 |
- "debug": "~2.6.9", |
|
19 |
+ "debug": "^4.1.0", |
|
20 |
+ "dotenv": "^8.0.0", |
|
11 | 21 |
"ejs": "~2.6.1", |
12 |
- "express": "~4.16.1", |
|
13 |
- "http-errors": "~1.6.3", |
|
14 |
- "morgan": "~1.9.1" |
|
22 |
+ "express": "~4.16.4", |
|
23 |
+ "express-session": "^1.16.1", |
|
24 |
+ "googleapis": "^41.0.1", |
|
25 |
+ "helmet": "^3.17.0", |
|
26 |
+ "knex": "^0.17.6", |
|
27 |
+ "marked": "^0.7.0", |
|
28 |
+ "morgan": "~1.9.1", |
|
29 |
+ "mysql": "^2.16.0", |
|
30 |
+ "node-fetch": "^2.2.0", |
|
31 |
+ "passport": "^0.4.0", |
|
32 |
+ "passport-facebook": "^3.0.0", |
|
33 |
+ "redis": "^2.8.0", |
|
34 |
+ "serve-favicon": "^2.5.0", |
|
35 |
+ "uuid": "^3.3.2" |
|
15 | 36 |
}, |
16 |
- "main": "app.js", |
|
17 |
- "keywords": [], |
|
18 |
- "author": "", |
|
19 |
- "license": "ISC", |
|
20 |
- "description": "" |
|
37 |
+ "devDependencies": { |
|
38 |
+ "@babel/cli": "^7.4.4", |
|
39 |
+ "@babel/core": "^7.4.5", |
|
40 |
+ "@babel/preset-env": "^7.4.5", |
|
41 |
+ "mocha": "^5.2.0" |
|
42 |
+ } |
|
21 | 43 |
} |
+++ sonar-project.properties
... | ... | @@ -0,0 +1,15 @@ |
1 | +# must be unique in a given SonarQube instance | |
2 | +sonar.projectKey=okdevtv:site | |
3 | +# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. | |
4 | +sonar.projectName=OKdevTV | |
5 | +sonar.projectVersion=1.0 | |
6 | + | |
7 | +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | |
8 | +# Since SonarQube 4.2, this property is optional if sonar.modules is set. | |
9 | +# If not set, SonarQube starts looking for source code from the directory containing | |
10 | +# the sonar-project.properties file. | |
11 | +sonar.sources=. | |
12 | +sonar.exclusions=test/**, node_modules/**, public/api/**, public/sh_3.0.83/**, public/slides.html5rocks.com/**, public/js/**/*.min.js, public/js/init.js | |
13 | + | |
14 | +# Encoding of the source code. Default is default system encoding | |
15 | +sonar.sourceEncoding=UTF-8 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?