Reaperxxxx commited on
Commit
e4b7153
·
verified ·
1 Parent(s): f4a6991

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -10
Dockerfile CHANGED
@@ -30,26 +30,20 @@ RUN apt-get update && apt-get install -y \
30
  rm -rf /var/lib/apt/lists/*
31
 
32
  # Copy package.json and package-lock.json first for caching
33
- COPY package.json ./
34
 
35
  # Install project dependencies
36
  RUN npm install
37
 
38
- # Install Playwright browsers and ensure Chromium is properly installed
 
39
  RUN npx playwright install --with-deps chromium
40
 
41
- # Set Playwright’s cache directory to ensure Chromium is available
42
- ENV PLAYWRIGHT_BROWSERS_PATH=/home/node/.cache/ms-playwright
43
-
44
  # Copy the application source code
45
  COPY . .
46
 
47
- # Ensure the container has the correct permissions
48
- RUN chown -R node:node /home/node/.cache/ms-playwright && \
49
- chmod -R 777 /home/node/.cache/ms-playwright
50
-
51
  # Expose the port
52
  EXPOSE 7860
53
 
54
  # Start the application
55
- CMD ["node", "server.js"]
 
30
  rm -rf /var/lib/apt/lists/*
31
 
32
  # Copy package.json and package-lock.json first for caching
33
+ COPY package.json package-lock.json ./
34
 
35
  # Install project dependencies
36
  RUN npm install
37
 
38
+ # Install Playwright browsers in the correct location
39
+ ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright
40
  RUN npx playwright install --with-deps chromium
41
 
 
 
 
42
  # Copy the application source code
43
  COPY . .
44
 
 
 
 
 
45
  # Expose the port
46
  EXPOSE 7860
47
 
48
  # Start the application
49
+ CMD ["node", "index.js"]