Skip to content

Commit 5c6664f

Browse files
committed
fix: pm2 cwd path
1 parent 806843f commit 5c6664f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ EXPOSE 3000
3434
RUN npm run build
3535

3636
# Start the Next.js project with PM2
37-
CMD ["pm2-runtime", "ecosystem.config.js"]
37+
CMD ["pm2-runtime", "npm", "--", "start"]

ecosystem.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
name: "data-nordeste",
44
script: "npm",
55
args: "start",
6+
cwd: __dirname, // Adiciona esta linha para definir o diretório atual como diretório de trabalho
67
instances: "max", // Usa todos os núcleos de CPU disponíveis
78
exec_mode: "cluster", // Executa em modo cluster para balancear a carga
89
autorestart: true, // Reinicia automaticamente em caso de falha

0 commit comments

Comments
 (0)