.
This commit is contained in:
parent
9970331856
commit
c22b5fba75
@ -3,21 +3,6 @@
|
|||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
FROM node:lts-iron AS builder
|
FROM node:lts-iron AS builder
|
||||||
|
|
||||||
# Configure default locale (important for chrome-headless-shell).
|
|
||||||
ENV LANG es_ES.UTF-8
|
|
||||||
|
|
||||||
# We don't need the standalone Chromium
|
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
|
||||||
|
|
||||||
# Install Google Chrome Stable and fonts
|
|
||||||
# Note: this installs the necessary libs to make the browser work with Puppeteer.
|
|
||||||
RUN apt-get update && apt-get install libnss3 gnupg wget -y && \
|
|
||||||
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
|
|
||||||
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install google-chrome-stable -y --no-install-recommends && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Establecer el directorio de trabajo
|
# Establecer el directorio de trabajo
|
||||||
WORKDIR /api
|
WORKDIR /api
|
||||||
|
|
||||||
@ -48,6 +33,23 @@ COPY server/src/contexts/sales/infrastructure/express/controllers/quotes/reportQ
|
|||||||
# FINAL STAGE (Producción)
|
# FINAL STAGE (Producción)
|
||||||
FROM node:lts-iron AS prod
|
FROM node:lts-iron AS prod
|
||||||
|
|
||||||
|
# Configure default locale (important for chrome-headless-shell).
|
||||||
|
ENV LANG es_ES.UTF-8
|
||||||
|
|
||||||
|
# We don't need the standalone Chromium
|
||||||
|
#ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||||
|
|
||||||
|
# Install Google Chrome Stable and fonts
|
||||||
|
# Note: this installs the necessary libs to make the browser work with Puppeteer.
|
||||||
|
#RUN apt-get update && apt-get install libnss3 gnupg wget -y && \
|
||||||
|
# wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
|
||||||
|
# sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
|
||||||
|
# apt-get update && \
|
||||||
|
# apt-get install google-chrome-stable -y --no-install-recommends && \
|
||||||
|
# rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 libcairo2 libpango-1.0-0
|
||||||
|
|
||||||
WORKDIR /api
|
WORKDIR /api
|
||||||
|
|
||||||
# Copiar los archivos del build desde la fase anterior
|
# Copiar los archivos del build desde la fase anterior
|
||||||
|
|||||||
@ -34,6 +34,7 @@ export const ReportQuotePresenter: IReportQuoteReporter = {
|
|||||||
// Generar el PDF con Puppeteer
|
// Generar el PDF con Puppeteer
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
args: [
|
args: [
|
||||||
|
"--disable-extensions",
|
||||||
"--no-sandbox",
|
"--no-sandbox",
|
||||||
"--disable-setuid-sandbox",
|
"--disable-setuid-sandbox",
|
||||||
"--disable-dev-shm-usage",
|
"--disable-dev-shm-usage",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user