File size: 420 Bytes
4c0b9f8 01dd5da 4c0b9f8 568f1fa 4c0b9f8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Base image
FROM node:18
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy seluruh project
COPY . .
# Tambahin ini:
RUN chmod -R 777 /app/src/pages/sh
# Use environment PORT
ENV PORT=7860
EXPOSE 7860
# Run as non-root user (optional tapi recommended)
RUN useradd -m user && chown -R user /app
USER user
# Start server
CMD ["node", "."] |