everydaytok commited on
Commit
0761cf8
·
verified ·
1 Parent(s): 929d24e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -8
Dockerfile CHANGED
@@ -1,15 +1,38 @@
1
- FROM node:20-slim
 
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
- COPY package.json ./
6
- RUN npm install --omit=dev
 
7
 
8
- COPY app.js ./
9
 
10
- # HF Spaces expects the app to listen on 7860 by default (see app_port
11
- # in README.md's Space metadata below).
12
- ENV PORT=7860
 
 
 
 
 
 
13
  EXPOSE 7860
 
 
 
 
 
14
 
15
- CMD ["node", "app.js"]
 
1
+ # FROM node:22.16.0
2
+ FROM oven/bun:1.3.4
3
 
4
+
5
+ # Install ffmpeg
6
+ # RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Create a non-root user with
9
+ RUN useradd -m -u 2000 user
10
+ USER user
11
+ ENV PATH="/home/user/.local/bin:$PATH"
12
+
13
+
14
+ # Set working directory
15
  WORKDIR /app
16
 
17
+ # COPY --chown=user bun.lockb bun.lockb
18
+ COPY --chown=user package.json package.json
19
+ RUN bun install
20
 
 
21
 
22
+
23
+ # Copy package files and install dependencies
24
+ #COPY --chown=user package*.json ./
25
+ # RUN npm install
26
+
27
+ # Copy the rest of the application source
28
+ COPY --chown=user . /app
29
+
30
+ # Expose the port if needed (optional, depending on the hosting environment)
31
  EXPOSE 7860
32
+ EXPOSE 8000
33
+ EXPOSE 8080
34
+
35
+ # Run the Node.js application
36
+ # CMD ["node", "app.js"]
37
 
38
+ CMD ["bun", "app.js"]