Remove browserless and add chrome in docker image

This commit is contained in:
Ricardo Paes
2022-02-08 14:19:31 -03:00
parent 9792f81e1e
commit c78d826a8f
4 changed files with 49 additions and 25 deletions

View File

@@ -43,12 +43,15 @@ export const initWbot = async (whatsapp: Whatsapp): Promise<Session> => {
sessionCfg = JSON.parse(whatsapp.session);
}
const args:String = process.env.CHROME_ARGS || "";
const wbot: Session = new Client({
session: sessionCfg,
puppeteer: {
executablePath: process.env.CHROME_BIN || undefined,
// @ts-ignore
browserWSEndpoint: process.env.CHROME_WS || undefined
browserWSEndpoint: process.env.CHROME_WS || undefined,
args: args.split(' ')
}
});