parent
704452322a
commit
dc8f20d104
@ -1,13 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/playwright:v1.20.0-focal
|
|
||||||
|
|
||||||
WORKDIR /server
|
|
||||||
RUN npm install playwright
|
|
||||||
COPY server.js .
|
|
||||||
|
|
||||||
ENV PLAYWRIGHT_PORT=4444
|
|
||||||
ENV PLAYWRIGHT_BROWSER_TYPE=chromium
|
|
||||||
ENV PLAYWRIGHT_HEADLESS=true
|
|
||||||
|
|
||||||
EXPOSE ${PLAYWRIGHT_PORT}
|
|
||||||
|
|
||||||
CMD [ "node", "server.js" ]
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"comment": "Allow create user namespaces",
|
|
||||||
"names": [
|
|
||||||
"clone",
|
|
||||||
"setns",
|
|
||||||
"unshare"
|
|
||||||
],
|
|
||||||
"action": "SCMP_ACT_ALLOW",
|
|
||||||
"args": [],
|
|
||||||
"includes": {},
|
|
||||||
"excludes": {}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
const playwright = require('playwright');
|
|
||||||
|
|
||||||
const port = parseInt(process.env.PLAYWRIGHT_PORT) || 4444;
|
|
||||||
const browserType = process.env.PLAYWRIGHT_BROWSER_TYPE?.toLowerCase() || 'chromium';
|
|
||||||
const headless = process.env.PLAYWRIGHT_HEADLESS?.toLowerCase() === 'true' || true;
|
|
||||||
const wsPath = 'playwright';
|
|
||||||
console.log('using port:', port, 'browser:', browserType, 'headless:', headless, 'wspath:', wsPath);
|
|
||||||
|
|
||||||
const serverPromise = playwright[browserType].launchServer({ headless: headless, port: port, wsPath: wsPath });
|
|
||||||
serverPromise.then(bs => console.log(bs.wsEndpoint()));
|
|
Loading…
Reference in new issue