update
This commit is contained in:
parent
0c3f13e734
commit
c9bef4e061
29
Dockerfile
29
Dockerfile
|
|
@ -1,38 +1,29 @@
|
|||
# Menggunakan image Node.js yang lebih ringan
|
||||
# Gunakan image Node.js yang ringan
|
||||
FROM node:23.5.0-alpine
|
||||
|
||||
# Mengatur port
|
||||
# Set port
|
||||
ENV PORT 3000
|
||||
|
||||
# RUN npm install --force
|
||||
# RUN npm install --force
|
||||
RUN npm install
|
||||
|
||||
# Membuat direktori aplikasi dan mengatur sebagai working directory
|
||||
# Set working directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Menyalin file penting terlebih dahulu untuk caching
|
||||
COPY package.json ./
|
||||
# Copy package.json dan package-lock.json (kalau ada)
|
||||
COPY package*.json ./
|
||||
|
||||
# Menyalin direktori ckeditor5 jika diperlukan
|
||||
# Copy vendor ckeditor (jika memang perlu sebelum install)
|
||||
COPY vendor/ckeditor5 ./vendor/ckeditor5
|
||||
|
||||
# Menyalin env
|
||||
# COPY .env .env
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
# RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Menyalin source code aplikasi
|
||||
# Copy semua source code
|
||||
COPY . .
|
||||
|
||||
# Build aplikasi
|
||||
RUN npm run build
|
||||
# RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm next build
|
||||
|
||||
# Expose port untuk server
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Perintah untuk menjalankan aplikasi
|
||||
CMD ["npm" "run" "start"]
|
||||
# Jalankan aplikasi
|
||||
CMD ["npm", "run", "start"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue