File size: 1,038 Bytes
850703c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9f6fbc
 
 
 
f9a19cd
850703c
f9a19cd
850703c
f9a19cd
b9f6fbc
850703c
 
 
 
f9a19cd
b9f6fbc
850703c
 
 
 
 
 
 
 
 
 
 
f9a19cd
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
# NovaStream
# Developed by: urstarkz
# Telegram: t.me/urstarkz
# Instagram: urstarkz
# Website: urstark.is-a.dev

# Use an official Node.js runtime as a parent image
FROM node:20-bullseye-slim

# Install FFmpeg and required dependencies
RUN apt-get update && \
    apt-get install -y ffmpeg && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# The official Node image already has a user 'node' with UID 1000
USER node
ENV HOME=/home/node \
    PATH=/home/node/.local/bin:$PATH

# Set the working directory in the container
WORKDIR $HOME/app

# Copy package.json and package-lock.json with correct permissions
COPY --chown=node package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code with correct permissions
COPY --chown=node . .

# Build the frontend (Vite)
RUN npm run build

# Expose the port the app runs on (Hugging Face Spaces uses port 7860 by default)
EXPOSE 7860

# Define environment variable for the port
ENV PORT=7860

# Start the Node.js server
CMD ["node", "server.cjs"]