fix: update dockerfile

This commit is contained in:
hanif salafi 2025-10-23 15:24:17 +07:00
parent 2f7bccfea9
commit 6a76f2c0c2
2 changed files with 15 additions and 1 deletions

View File

@ -31,4 +31,4 @@ RUN pnpm run build
EXPOSE 3000
# Jalankan Next.js dalam mode cluster (gunakan semua core)
CMD ["pm2-runtime", "start", "node_modules/next/dist/bin/next", "-i", "max", "--name", "next-app", "--", "start", "-p", "3000"]
CMD ["pm2-runtime", "ecosystem.config.js"]

14
ecosystem.config.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
apps: [
{
name: "next-app",
script: "node_modules/next/dist/bin/next",
args: "start -p 3000",
instances: "max",
exec_mode: "cluster",
env: {
NODE_ENV: "production"
}
}
]
}