,
This commit is contained in:
parent
4a0d0e5dba
commit
8c1ce3de4c
@ -32,4 +32,46 @@ COPY server/src/contexts/sales/infrastructure/express/controllers/quotes/reportQ
|
||||
RUN mkdir -p /api/dist/uploads/images/
|
||||
COPY server/uploads/images/* /api/dist/uploads/images
|
||||
|
||||
CMD ls -la /api/dist/uploads/images/
|
||||
CMD ls -la /api/dist/uploads
|
||||
|
||||
# FINAL STAGE (Producción)
|
||||
FROM node:lts-iron AS prod
|
||||
|
||||
# Configure default locale (important for chrome-headless-shell).
|
||||
ENV LANG es_ES.UTF-8
|
||||
|
||||
# Descargar chromium
|
||||
#ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD false
|
||||
|
||||
# Install Google Chrome Stable and fonts
|
||||
# Note: this installs the necessary libs to make the browser work with Puppeteer.
|
||||
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
|
||||
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
|
||||
# installs, work.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y wget gnupg \
|
||||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& 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 -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
|
||||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
WORKDIR /api
|
||||
|
||||
# Copiar los archivos del build desde la fase anterior
|
||||
COPY --from=builder /api/dist .
|
||||
COPY --from=builder /api/server/package.json .
|
||||
COPY --from=builder /api/server/tsconfig.production.json ./tsconfig.json
|
||||
|
||||
# Instalar sólo las dependencias de producción en el servidor
|
||||
RUN yarn install --production
|
||||
|
||||
# Exponer el puerto que la API usa
|
||||
EXPOSE 3001
|
||||
|
||||
# Comando para correr la aplicación
|
||||
#CMD ls -la /api/uploads
|
||||
CMD node -r ts-node/register/transpile-only -r tsconfig-paths/register ./server/src/index.js
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user