This commit is contained in:
Anang Yusman 2025-12-30 17:09:25 +08:00
parent 163c0c5a9c
commit ae5f61d307
1 changed files with 13 additions and 12 deletions

View File

@ -1,24 +1,25 @@
FROM node:21-alpine
ENV PORT 4000
ENV PORT=4000
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Installing dependencies
COPY package*.json /usr/src/app/
# Install git (WAJIB untuk next build)
RUN apk add --no-cache git
# RUN npm install --force
# Copy package files
COPY package*.json ./
# Install dependencies (cukup SEKALI)
RUN npm install --legacy-peer-deps
RUN npm install
# Copying source files
COPY . /usr/src/app
# Copy source
COPY . .
# Building app
# Build app
RUN npm run build
EXPOSE 4000
# Running the app
CMD "npm" "run" "start"
# Run app
CMD ["npm", "run", "start"]