fixing dockerfile
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Rama Priyanto 2026-04-01 15:41:26 +07:00
parent 34fbd84c83
commit f2e5ec91fb
1 changed files with 2 additions and 76 deletions

View File

@ -1,97 +1,23 @@
# FROM node:23.5.0-alpine
# ENV PORT 4000
# # pnpm install globally
# RUN npm install -g pnpm
# # Create app directory
# RUN mkdir -p /usr/src/app
# WORKDIR /usr/src/app
# # Installing dependencies
# COPY package.json pnpm-lock.yaml ./
# # Copy ckeditor5 to workdir
# COPY vendor/ckeditor5 ./vendor/ckeditor5
# # Install dependencies
# RUN pnpm install --frozen-lockfile
# # RUN npm install --force
# # RUN npm install -g npm@latest
# # RUN npm install
# # Copying source files
# COPY . .
# # Building app
# RUN pnpm run build
# EXPOSE 4000
# # Running the app
# CMD ["pnpm", "run", "start"]
# FROM node:23.5.0-alpine
# ENV PORT 4000
# # Install Yarn globally
# # RUN npm install -g yarn
# # Create app directory
# RUN mkdir -p /usr/src/app
# WORKDIR /usr/src/app
# # Copy package.json and yarn.lock
# COPY package.json yarn.lock ./
# # Copy ckeditor5 to workdir
# COPY vendor/ckeditor5 ./vendor/ckeditor5
# # Install dependencies
# RUN yarn install --frozen-lockfile
# # Copying source files
# COPY . .
# # Building app
# RUN yarn build
# EXPOSE 4000
# # Running the app
# CMD ["yarn", "start"]
# Gunakan image Node.js
FROM node:23.5.0-alpine
# Tentukan port yang akan digunakan
ENV PORT 4000
# Buat direktori aplikasi
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Salin file package.json dan lock file
COPY package.json package-lock.json ./
# Salin ckeditor5 ke dalam workdir
COPY vendor/ckeditor5 ./vendor/ckeditor5
# Instal dependensi
RUN npm install -g npm@latest
# RUN npm install next --legacy-peer-deps
# Salin semua file proyek
# COPY . .
RUN npm install next --legacy-peer-deps
COPY . /usr/src/app
# Bangun aplikasi
RUN npm run build
# Ekspos port aplikasi
EXPOSE 4000
# Jalankan aplikasi