add puppeteer executable path
This commit is contained in:
parent
f4d3319d51
commit
95606f3e5f
@ -1,6 +1,9 @@
|
|||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM node:19-alpine AS deps
|
FROM node:19-alpine AS deps
|
||||||
|
|
||||||
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser
|
||||||
|
|
||||||
WORKDIR leCoffre
|
WORKDIR leCoffre
|
||||||
|
|
||||||
RUN npm install -D prisma@4.11.0
|
RUN npm install -D prisma@4.11.0
|
||||||
@ -33,9 +36,6 @@ FROM node:19-alpine AS production
|
|||||||
|
|
||||||
WORKDIR leCoffre
|
WORKDIR leCoffre
|
||||||
|
|
||||||
ENV CHROME_BIN="/usr/bin/chromium-browser"\
|
|
||||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
|
|
||||||
|
|
||||||
RUN adduser -D lecoffreuser --uid 10000 && chown -R lecoffreuser .
|
RUN adduser -D lecoffreuser --uid 10000 && chown -R lecoffreuser .
|
||||||
|
|
||||||
COPY --from=builder --chown=lecoffreuser leCoffre/node_modules ./node_modules
|
COPY --from=builder --chown=lecoffreuser leCoffre/node_modules ./node_modules
|
||||||
|
@ -73,7 +73,7 @@ export default class AnchoringProofService extends BaseService {
|
|||||||
public async generate(data: AnchoringProofData): Promise<Buffer> {
|
public async generate(data: AnchoringProofData): Promise<Buffer> {
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
headless: "new",
|
headless: "new",
|
||||||
executablePath: process.env['CHROME_BIN'],
|
executablePath: process.env['PUPPETEER_EXECUTABLE_PATH'],
|
||||||
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
||||||
});
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user