Reaperxxxx commited on
Commit
790a401
·
verified ·
1 Parent(s): 5625981

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -1,23 +1,24 @@
1
- # Use official Node.js 18 base image
2
  FROM node:18
3
 
4
- # Set the working directory inside the container
5
- WORKDIR /app
6
 
7
- # Create a package.json file inside the container
8
- RUN npm init -y
9
 
10
- # Install required dependencies
11
- RUN npm install express axios fs path progress-stream ffmpeg-static fluent-ffmpeg
 
12
 
13
- # Copy all project files to the container
14
  COPY . .
15
 
16
- # Create required directories and set correct permissions
17
  RUN mkdir -p /app/downloads && chmod -R 777 /app/downloads
18
 
19
- # Expose the API port
20
  EXPOSE 7860
21
 
22
- # Start the Node.js server
23
  CMD ["node", "server.js"]
 
1
+ # Use official Node.js base image
2
  FROM node:18
3
 
4
+ # Install FFmpeg and aria2 for fast downloads
5
+ RUN apt-get update && apt-get install -y ffmpeg aria2 && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Set working directory
8
+ WORKDIR /app
9
 
10
+ # Copy dependencies
11
+ COPY package.json package-lock.json ./
12
+ RUN npm install
13
 
14
+ # Copy project files
15
  COPY . .
16
 
17
+ # Create downloads directory
18
  RUN mkdir -p /app/downloads && chmod -R 777 /app/downloads
19
 
20
+ # Expose API port
21
  EXPOSE 7860
22
 
23
+ # Start the server
24
  CMD ["node", "server.js"]