Skip to content

Commit

Permalink
Tarefa prática rcaa#2 - Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudersonXavier committed Dec 15, 2024
1 parent 8245f28 commit 364b098
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Toy example of microservice",
"main": "",
"scripts": {
"start": "run-p start-frontend start-controller start-shipping start-inventory",
"start": "run-p start-frontend start-controller start-inventory",
"start-controller": "nodemon services/controller/index.js",
"start-shipping": "nodemon services/shipping/index.js",
"start-inventory": "nodemon services/inventory/index.js",
Expand All @@ -29,11 +29,12 @@
"@grpc/proto-loader": "^0.6.9",
"cors": "^2.8.5",
"express": "^4.17.1",
"google-protobuf": "^3.19.3"
"google-protobuf": "^3.19.3",
"micro-livraria": "file:"
},
"devDependencies": {
"serve": "^13.0.2",
"nodemon": "^2.0.7",
"npm-run-all": "^4.1.5"
"npm-run-all": "^4.1.5",
"serve": "^13.0.2"
}
}
14 changes: 14 additions & 0 deletions shipping.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Imagem base derivada do Node
FROM node

# Diretório de trabalho
WORKDIR /app

# Comando para copiar os arquivos para a pasta /app da imagem
COPY . /app

# Comando para instalar as dependências
RUN npm install

# Comando para inicializar (executar) a aplicação
CMD ["node", "/app/services/shipping/index.js"]

0 comments on commit 364b098

Please sign in to comment.