fix
This commit is contained in:
parent
3920c90097
commit
3fc12c1a13
18
Dockerfile
18
Dockerfile
|
|
@ -1,27 +1,31 @@
|
||||||
# Gunakan image Node.js yang ringan
|
|
||||||
FROM node:23.5.0-alpine
|
FROM node:23.5.0-alpine
|
||||||
|
|
||||||
|
# Tambah dependency penting untuk build
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|
||||||
# Set port
|
# Set port
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Copy package.json dan package-lock.json (kalau ada)
|
# Copy package.json dan lockfile
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Copy vendor ckeditor (jika memang perlu sebelum install)
|
|
||||||
COPY vendor/ckeditor5 ./vendor/ckeditor5
|
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm ci
|
||||||
|
|
||||||
|
# Copy vendor ckeditor kalau perlu
|
||||||
|
COPY vendor/ckeditor5 ./vendor/ckeditor5
|
||||||
|
|
||||||
# Copy semua source code
|
# Copy semua source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Build Next.js
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Jalankan aplikasi
|
# Start app
|
||||||
CMD ["npm", "run", "start"]
|
CMD ["npm", "run", "start"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue