From 6a76f2c0c279ba43f95ae9403a0c2902c2906913 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 23 Oct 2025 15:24:17 +0700 Subject: [PATCH] fix: update dockerfile --- Dockerfile | 2 +- ecosystem.config.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ecosystem.config.js diff --git a/Dockerfile b/Dockerfile index 16a60d9a..551071a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +CMD ["pm2-runtime", "ecosystem.config.js"] \ No newline at end of file diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 00000000..30c15de8 --- /dev/null +++ b/ecosystem.config.js @@ -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" + } + } + ] +}