This commit is contained in:
David Arranz 2024-09-13 12:58:51 +02:00
parent ddde35a367
commit 83df3a87fe
4 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,10 @@ RUN cd ./server && yarn install
# Si hay un error, mostrarlo en detalle.
RUN cd ./server && yarn run build || { echo 'Error during build'; exit 1; }
# Copiar plantillas
RUN mkdir -p /api/dist/server/src/contexts/sales/infrastructure/express/controllers/quotes/reportQuote/reporter/templates/quote/
COPY server/src/contexts/sales/infrastructure/express/controllers/quotes/reportQuote/reporter/templates/quote/* /api/dist/server/src/contexts/sales/infrastructure/express/controllers/quotes/reportQuote/reporter/templates/quote
# FINAL STAGE (Producción)
FROM node:lts-iron AS prod

View File

@ -33,7 +33,7 @@ module.exports = {
server: {
hostname: process.env.HOSTNAME || "127.0.0.1",
port: process.env.PORT || 4001,
public_url: "",
cors_origin: "*",
},
admin: {

View File

@ -18,6 +18,7 @@ module.exports = {
server: {
hostname: process.env.HOSTNAME || "127.0.0.1",
port: process.env.PORT || 3001,
cors_origin: "https://presupuestos.uecko.com",
},
admin: {

View File

@ -7,6 +7,7 @@ import { configurePassportAuth } from "@/contexts/auth";
import morgan from "morgan";
import passport from "passport";
import path from "path";
import { config } from "../../config";
import { v1Routes } from "./api/v1";
//const logger = initLogger(rTracer);
@ -26,7 +27,8 @@ app.use(responseTime());
// enable CORS - Cross Origin Resource Sharing
app.use(
cors({
origin: "*", //"http://localhost:5173",
origin: config.server.cors_origin,
methods: "GET,POST,PUT,DELETE",
credentials: true,
exposedHeaders: [