Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Draft: Adicionando Docker ao projeto #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# node_modules
node_modules

# Git
.git
.gitignore
README.md

# Tests
tests

# Lint
.eslintrc.js
.prettierrc

# Docker
Dockerfile
docker-compose
.dockerignore
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:alpine AS build

WORKDIR /usr/app

LABEL name="buid"

COPY package*.json ./
COPY tsconfig*.json ./
RUN npm install

COPY . .

RUN npm run build

FROM node:alpine AS production

WORKDIR /usr/app

LABEL name="production"

COPY package*.json ./

RUN npm install --production

COPY --from=build /usr/app/dist ./dist

ENTRYPOINT [ "npm", "run", "start:prod" ]