Skip to content

Commit

Permalink
build: add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tc9011 committed Aug 2, 2019
1 parent 6ac9cea commit 984e790
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -0,0 +1 @@
node_modules/
13 changes: 13 additions & 0 deletions Dockerfile
@@ -0,0 +1,13 @@
FROM node:10.15.3

WORKDIR /app

COPY . /app

RUN npm i pm2 -g \
&& npm i \
&& npm run build

EXPOSE 3300

CMD ["npm", "prod"]
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -5,6 +5,9 @@
"author": "",
"license": "MIT",
"scripts": {
"prod": "cross-env NODE_ENV=production pm2 start dist/main.js --name 'awesome-nest'",
"uat": "cross-env NODE_ENV=uat pm2 start dist/main.js --name 'awesome-nest'",
"stop": "pm2 delete awesome-nest",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --config .prettierrc --write \"src/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts",
Expand Down

0 comments on commit 984e790

Please sign in to comment.