Nand0ZZ commited on
Commit
6258968
·
1 Parent(s): b11482b
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,8 +1,11 @@
1
- # Use official Node.js image
 
 
2
  FROM node:18-bullseye
3
 
4
  # -----------------------------
5
  # Install system dependencies
 
6
  # -----------------------------
7
  RUN apt-get update && apt-get install -y \
8
  tesseract-ocr \
@@ -26,12 +29,12 @@ WORKDIR /app
26
  COPY package*.json ./
27
 
28
  # -----------------------------
29
- # Install Node dependencies
30
  # -----------------------------
31
  RUN npm install --production
32
 
33
  # -----------------------------
34
- # Copy app source
35
  # -----------------------------
36
  COPY . .
37
 
@@ -41,7 +44,7 @@ COPY . .
41
  RUN mkdir -p uploads
42
 
43
  # -----------------------------
44
- # Hugging Face requires port 7860
45
  # -----------------------------
46
  EXPOSE 7860
47
 
@@ -52,6 +55,7 @@ ENV NODE_ENV=production
52
  ENV PORT=7860
53
 
54
  # -----------------------------
55
- # Start the server
 
56
  # -----------------------------
57
- CMD ["node", "server.js"]
 
1
+ # -----------------------------
2
+ # Base image
3
+ # -----------------------------
4
  FROM node:18-bullseye
5
 
6
  # -----------------------------
7
  # Install system dependencies
8
+ # Required for: sharp, tesseract, pdf parsing
9
  # -----------------------------
10
  RUN apt-get update && apt-get install -y \
11
  tesseract-ocr \
 
29
  COPY package*.json ./
30
 
31
  # -----------------------------
32
+ # Install dependencies
33
  # -----------------------------
34
  RUN npm install --production
35
 
36
  # -----------------------------
37
+ # Copy rest of the source
38
  # -----------------------------
39
  COPY . .
40
 
 
44
  RUN mkdir -p uploads
45
 
46
  # -----------------------------
47
+ # Hugging Face Spaces port
48
  # -----------------------------
49
  EXPOSE 7860
50
 
 
55
  ENV PORT=7860
56
 
57
  # -----------------------------
58
+ # Start your app
59
+ # IMPORTANT: entry file is room.js
60
  # -----------------------------
61
+ CMD ["node", "room.js"]