feat: Actualizar configuraciones de API y mejorar tiempos de espera en nginx
This commit is contained in:
@@ -419,11 +419,11 @@ fi
|
|||||||
# Configurar URLs de la API para el frontend
|
# Configurar URLs de la API para el frontend
|
||||||
echo " Configurando URLs de la API para el frontend..."
|
echo " Configurando URLs de la API para el frontend..."
|
||||||
if [ "$PROTOCOL" = "https" ]; then
|
if [ "$PROTOCOL" = "https" ]; then
|
||||||
CMS_URL="https://$STUDIO_DOMAIN"
|
CMS_URL="https://$STUDIO_DOMAIN/cms-api"
|
||||||
LMS_URL="https://$LEARNING_DOMAIN"
|
LMS_URL="https://$LEARNING_DOMAIN/lms-api"
|
||||||
else
|
else
|
||||||
CMS_URL="http://$STUDIO_DOMAIN"
|
CMS_URL="http://$STUDIO_DOMAIN/cms-api"
|
||||||
LMS_URL="http://$LEARNING_DOMAIN"
|
LMS_URL="http://$LEARNING_DOMAIN/lms-api"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remover valores existentes
|
# Remover valores existentes
|
||||||
|
|||||||
@@ -21,4 +21,8 @@ location /cms-api/ {
|
|||||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
proxy_connect_timeout 60s;
|
||||||
|
proxy_send_timeout 600s;
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
send_timeout 600s;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ location /cms-api/ {
|
|||||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
proxy_connect_timeout 60s;
|
||||||
|
proxy_send_timeout 600s;
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
send_timeout 600s;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /lms-api/ {
|
location /lms-api/ {
|
||||||
|
|||||||
@@ -854,7 +854,7 @@ pub async fn get_mysql_courses_by_plan(
|
|||||||
c.level as nivel_curso,
|
c.level as nivel_curso,
|
||||||
sp.mysql_id as id_plan_de_estudios,
|
sp.mysql_id as id_plan_de_estudios,
|
||||||
sp.name as nombre_plan,
|
sp.name as nombre_plan,
|
||||||
c.duracion as duracion
|
c.duracion::double precision as duracion
|
||||||
FROM mysql_courses c
|
FROM mysql_courses c
|
||||||
JOIN mysql_study_plans sp ON c.study_plan_id = sp.id
|
JOIN mysql_study_plans sp ON c.study_plan_id = sp.id
|
||||||
WHERE c.organization_id = $1
|
WHERE c.organization_id = $1
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Inter } from "next/font/google";
|
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { AuthProvider } from "@/context/AuthContext";
|
import { AuthProvider } from "@/context/AuthContext";
|
||||||
@@ -8,8 +7,6 @@ import { BrandingProvider } from "@/context/BrandingContext";
|
|||||||
import AuthGuard from "@/components/AuthGuard";
|
import AuthGuard from "@/components/AuthGuard";
|
||||||
import { ThemeProvider } from "@/context/ThemeContext";
|
import { ThemeProvider } from "@/context/ThemeContext";
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Experiencia de Aprendizaje",
|
title: "Experiencia de Aprendizaje",
|
||||||
description: "Consume contenido educativo de alta fidelidad.",
|
description: "Consume contenido educativo de alta fidelidad.",
|
||||||
@@ -24,7 +21,7 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body className={`${inter.className} min-h-screen flex flex-col transition-colors duration-300`}>
|
<body className="min-h-screen flex flex-col font-sans transition-colors duration-300">
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<BrandingProvider>
|
<BrandingProvider>
|
||||||
<AuthProvider>
|
<AuthProvider>
|
||||||
|
|||||||
@@ -72,10 +72,6 @@ const nextConfig = {
|
|||||||
source: '/question-bank/:path*',
|
source: '/question-bank/:path*',
|
||||||
destination: 'http://localhost:3001/question-bank/:path*',
|
destination: 'http://localhost:3001/question-bank/:path*',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: '/test-templates/:path*',
|
|
||||||
destination: 'http://localhost:3001/test-templates/:path*',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: '/knowledge-base/:path*',
|
source: '/knowledge-base/:path*',
|
||||||
destination: 'http://localhost:3001/knowledge-base/:path*',
|
destination: 'http://localhost:3001/knowledge-base/:path*',
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Inter } from "next/font/google";
|
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { AuthProvider } from "@/context/AuthContext";
|
import { AuthProvider } from "@/context/AuthContext";
|
||||||
@@ -9,8 +8,6 @@ import AuthGuard from "@/components/AuthGuard";
|
|||||||
import { BrandingProvider } from "@/context/BrandingContext";
|
import { BrandingProvider } from "@/context/BrandingContext";
|
||||||
import { ThemeProvider } from "@/context/ThemeContext";
|
import { ThemeProvider } from "@/context/ThemeContext";
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Studio",
|
title: "Studio",
|
||||||
description: "Crea y gestiona contenido educativo de alta fidelidad.",
|
description: "Crea y gestiona contenido educativo de alta fidelidad.",
|
||||||
@@ -25,7 +22,7 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
<body className={`${inter.className} min-h-screen flex flex-col transition-colors duration-300`}>
|
<body className="min-h-screen flex flex-col font-sans transition-colors duration-300">
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<AuthProvider>
|
<AuthProvider>
|
||||||
<I18nProvider>
|
<I18nProvider>
|
||||||
|
|||||||
Reference in New Issue
Block a user