From ea48e5ca9fe26db8771d2b8c701acb8eb049f1ec Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Tue, 23 Sep 2025 11:15:09 +0800 Subject: [PATCH] update --- Dockerfile | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81b8456..c1d2426 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,38 +1,26 @@ + # Menggunakan image Node.js yang lebih ringan FROM node:23.5.0-alpine - # Mengatur port ENV PORT 3000 - -# RUN npm install --force -RUN npm install --legacy-peer-deps -RUN npm install - +# Install pnpm secara global +RUN npm install -g pnpm # Membuat direktori aplikasi dan mengatur sebagai working directory WORKDIR /usr/src/app - # Menyalin file penting terlebih dahulu untuk caching COPY package.json ./ - # Menyalin direktori ckeditor5 jika diperlukan COPY vendor/ckeditor5 ./vendor/ckeditor5 - # Menyalin env COPY .env .env - # Install dependencies -RUN npm install +RUN pnpm install # RUN pnpm install --frozen-lockfile - # Menyalin source code aplikasi COPY . . - # Build aplikasi -RUN npm run build -# RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm next build - +RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm next build # Expose port untuk server EXPOSE 3000 - # Perintah untuk menjalankan aplikasi -CMD ["npm" "run" "start"] \ No newline at end of file +CMD ["pnpm", "run", "start"] \ No newline at end of file