Skip to content

Commit

Permalink
Add Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
angellandros committed Oct 19, 2019
1 parent c6c5b32 commit 9a525bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:12.10

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install

COPY . /usr/src/app
RUN npm run build:all

ENV NODE_ENV docker

EXPOSE 3000

CMD [ "npm", "run", "server" ]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build:ts": "tsc -p src",
"build:all": "npm run build:routes && npm run build:swagger && npm run build:ts",
"server": "node dist/main.js",
"docker:build": "docker build -t angellandros/express-ts .",
"lint": "tslint -c tslint.json 'src/**/*.ts'"
},
"repository": {
Expand Down

0 comments on commit 9a525bf

Please sign in to comment.