Arreglo de la generación de reports en producción
This commit is contained in:
parent
99c161cb31
commit
2a1a42fd9c
36
Dockerfile
36
Dockerfile
@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:1.7-labs
|
||||
|
||||
ARG NODE_IMAGE=node:24-alpine
|
||||
ARG NODE_IMAGE=node:24-bookworm-slim
|
||||
ARG PNPM_VERSION=10.20.0
|
||||
|
||||
########################
|
||||
@ -38,6 +38,8 @@ FROM base AS builder
|
||||
COPY --from=pruner /repo/out/full/ ./
|
||||
COPY --from=pruner /repo/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
|
||||
COPY --from=pruner /repo/modules/customer-invoices/src/api/application/use-cases/proformas/report-proforma/reporter/templates ./templates
|
||||
|
||||
# Reutilizamos la store prefetch
|
||||
#COPY --from=installer /root/.local/share/pnpm/store /root/.local/share/pnpm/store
|
||||
|
||||
@ -53,12 +55,34 @@ RUN pnpm -w turbo run build --filter=@erp/factuges-server...
|
||||
########################
|
||||
#FROM ${NODE_IMAGE} AS runner
|
||||
FROM base AS runner
|
||||
ENV NODE_ENV=production TZ=UTC
|
||||
|
||||
# Configure default locale (important for chrome-headless-shell).
|
||||
ENV NODE_ENV=production TZ=UTC LANG=es_ES.UTF-8
|
||||
|
||||
# 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/*
|
||||
|
||||
|
||||
# PUPPETEER CONFIG
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=true \
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
|
||||
|
||||
|
||||
# Don't run production as root
|
||||
RUN addgroup --system --gid 1001 expressjs
|
||||
RUN adduser --system --uid 1001 expressjs
|
||||
USER expressjs
|
||||
#RUN addgroup --system --gid 1001 expressjs
|
||||
#RUN adduser --system --uid 1001 expressjs
|
||||
#USER expressjs
|
||||
|
||||
#COPY --from=builder /repo .
|
||||
COPY --from=builder /repo/node_modules ./node_modules
|
||||
@ -72,6 +96,8 @@ COPY --from=builder /repo/apps/server/.env.production ./apps/server/dist/.env
|
||||
COPY --from=builder /repo/apps/server/node_modules ./apps/server/node_modules
|
||||
COPY --from=builder /repo/apps/server/package.json ./apps/server/package.json
|
||||
|
||||
COPY --from=builder /repo/templates ./apps/server/dist/templates
|
||||
|
||||
|
||||
# Salud del contenedor (ajusta puerto/endpoint)
|
||||
#HEALTHCHECK --interval=20s --timeout=3s --retries=5 \
|
||||
|
||||
@ -20,3 +20,6 @@ TRUST_PROXY=0
|
||||
JWT_SECRET=supersecretkey
|
||||
JWT_ACCESS_EXPIRATION=1h
|
||||
JWT_REFRESH_EXPIRATION=7d
|
||||
|
||||
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
|
||||
@ -59,5 +59,6 @@ JWT_ACCESS_EXPIRATION=1h
|
||||
JWT_REFRESH_EXPIRATION=7d
|
||||
|
||||
# ───────────────────────────────
|
||||
# Otros (opcional / a futuro)
|
||||
# Otros
|
||||
# ───────────────────────────────
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
|
||||
@ -33,3 +33,5 @@ TRUST_PROXY=0
|
||||
JWT_SECRET=supersecretkey
|
||||
JWT_ACCESS_EXPIRATION=1h
|
||||
JWT_REFRESH_EXPIRATION=7d
|
||||
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/factuges-server",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsup src/index.ts --config tsup.config.ts",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@erp/factuges-web",
|
||||
"private": true,
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --host --clearScreen false",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/auth",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/core",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/customer-invoices",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/customers",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/doc-numbering",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@erp/verifactu",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@repo/rdx-criteria",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@repo/rdx-ddd",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@repo/rdx-logger",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@repo/rdx-utils",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.12",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user