fix
This commit is contained in:
parent
c3da5edf46
commit
e505a16a26
14
Dockerfile
14
Dockerfile
|
|
@ -4,8 +4,9 @@ FROM node:23.5.0-alpine
|
|||
# Mengatur port
|
||||
ENV PORT 3000
|
||||
|
||||
# Install pnpm secara global
|
||||
RUN npm install -g pnpm
|
||||
# RUN npm install --force
|
||||
RUN npm install --legacy-peer-deps
|
||||
RUN npm install
|
||||
|
||||
# Membuat direktori aplikasi dan mengatur sebagai working directory
|
||||
WORKDIR /usr/src/app
|
||||
|
|
@ -17,20 +18,21 @@ COPY package.json ./
|
|||
COPY vendor/ckeditor5 ./vendor/ckeditor5
|
||||
|
||||
# Menyalin env
|
||||
COPY .env .env
|
||||
# COPY .env .env
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install
|
||||
RUN npm install
|
||||
# RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Menyalin source code aplikasi
|
||||
COPY . .
|
||||
|
||||
# Build aplikasi
|
||||
RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm next build
|
||||
RUN npm run build
|
||||
# RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm next build
|
||||
|
||||
# Expose port untuk server
|
||||
EXPOSE 3000
|
||||
|
||||
# Perintah untuk menjalankan aplikasi
|
||||
CMD ["pnpm", "run", "start"]
|
||||
CMD ["npm" "run" "start"]
|
||||
Loading…
Reference in New Issue