Web / Dockerfile
Aqso's picture
Update Dockerfile
fb7d423 verified
raw
history blame contribute delete
711 Bytes
FROM node:20-slim
# Gunakan root untuk install dependencies
USER root
RUN apt-get update --fix-missing && apt-get install -y \
chromium \
fonts-ipafont-gothic \
libxss1 \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set environment agar Puppeteer deteksi Chromium sistem
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Set folder kerja
WORKDIR /app
# Copy package dulu biar build cache cepet
COPY package*.json ./
RUN npm install
# Copy semua file
COPY . .
# Pastikan user 1000 (default HF) punya akses ke folder /app
RUN chmod -R 777 /app
# Port wajib
EXPOSE 7860
# Jalankan app
CMD ["node", "index.js"]