hutatools / Dockerfile
fullpwerr's picture
o
3a28ce9
raw
history blame contribute delete
807 Bytes
FROM node:18-bullseye
# Set work directory
WORKDIR /app
# Copy package files dan install dependencies
COPY package*.json ./
RUN npm install --omit=dev
# Install dependencies yang diperlukan oleh yt-dlp
RUN apt update && apt install -y \
ffmpeg \
python3 \
python3-pip \
wget \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& rm -rf /var/lib/apt/lists/*
# Download dan setup yt-dlp
RUN wget -O /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \
&& chmod +x /usr/local/bin/yt-dlp
# Copy semua file ke container
COPY . .
# Pastikan yt-dlp bisa dijalankan
RUN /usr/local/bin/yt-dlp --version
RUN chmod 666 /app/lib/cookies/*.txt
RUN chmod -R 777 /app/tmp/
# Expose port untuk aplikasi
EXPOSE 7860
# Jalankan aplikasi
CMD ["npm", "start"]