File size: 1,330 Bytes
9df6ae5 d401402 | 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | FROM node:20-bookworm
WORKDIR /app
# Install dependencies for FFmpeg extraction and locales
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
xz-utils \
curl \
locales \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# Use UTF-8 locales
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Download and install FFmpeg from BtbN (linux64-gpl build)
RUN wget -q https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz || \
curl -L -O https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz && \
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/ffmpeg && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/ffprobe && \
rm -rf ffmpeg-master-latest-linux64-gpl.tar.xz ffmpeg-master-latest-linux64-gpl
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Add these lines:
ENV DOWNLOADS_DIR=/mnt/data/downloads
ENV ENCODED_DIR=/mnt/data/encoded
ENV PORT=7860
EXPOSE 7860
CMD ["node", "server/index.js"]
|