Spaces:
Sleeping
Sleeping
File size: 631 Bytes
67acec9 | 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 | # Use Node.js 18
FROM node:18-bullseye-slim
# Install system libraries required for FFmpeg (just in case static fails)
RUN apt-get update && apt-get install -y \
python3 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy package files first (better caching)
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the app code
COPY . .
# Create a directory for permissions and switch to non-root user
RUN chown -R 1000:1000 /app
USER 1000
# Expose the port Hugging Face expects
EXPOSE 7860
ENV PORT=7860
# Start the server
CMD ["npm", "start"] |