Reaperxxxx commited on
Commit
5c6ba34
·
verified ·
1 Parent(s): bba81e7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -29,14 +29,16 @@ RUN apt-get update && apt-get install -y \
29
  --no-install-recommends && \
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 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
@@ -46,4 +48,4 @@ COPY . .
46
  EXPOSE 7860
47
 
48
  # Start the application
49
- CMD ["node", "server.js"]
 
29
  --no-install-recommends && \
30
  rm -rf /var/lib/apt/lists/*
31
 
32
+ # Set environment variable for Playwright browsers path
33
+ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
34
+
35
  # Copy package.json and package-lock.json first for caching
36
  COPY package.json ./
37
 
38
  # Install project dependencies
39
  RUN npm install
40
 
41
+ # Install Playwright browsers
 
42
  RUN npx playwright install --with-deps chromium
43
 
44
  # Copy the application source code
 
48
  EXPOSE 7860
49
 
50
  # Start the application
51
+ CMD npx playwright install --with-deps chromium && node server.js