Skip to content

Commit

Permalink
Create DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
cetrix13 committed Sep 4, 2022
1 parent 2f55f7e commit b7e06ed
Show file tree
Hide file tree
Showing 4 changed files with 15,078 additions and 11 deletions.
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# node_modules contains dependecies necessary only for build
node_modules

# directory will be autogenerated on a successfull build
dist

# not necessary for a build
test

# Git things
.git
.gitignore

# Visual Studio code things
.vscode
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:14-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci
WORKDIR /app
COPY ./ .
RUN npm run build

FROM node:14-alpine as production-stage
COPY --from=build-stage /app/dist ./dist

USER node
ENV PORT=8081
EXPOSE 8081

CMD [ "node", "dist/main.js" ]
Loading

0 comments on commit b7e06ed

Please sign in to comment.