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