playwright headless fix
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -45,6 +45,17 @@ RUN git clone https://github.com/Sahith59/OverLeaf_MCP.git . \
|
|||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
RUN npx playwright install chromium
|
RUN npx playwright install chromium
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# 5. Force headless mode in the built code
|
||||||
|
# The source launches Playwright with headless:false (designed
|
||||||
|
# for desktop). We patch the compiled JS to force headless:true.
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
RUN find /app/dist -name '*.js' -exec sed -i \
|
||||||
|
-e 's/headless:\s*false/headless:true/g' \
|
||||||
|
-e 's/headless:!1/headless:true/g' \
|
||||||
|
-e "s/headless:!0/headless:true/g" \
|
||||||
|
{} +
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 5. Create data directories
|
# 5. Create data directories
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user