Agregar soporte para URL interna de Gitea
All checks were successful
build-and-deploy / build (push) Successful in 11s
build-and-deploy / deploy (push) Successful in 3s

- Agregada variable GIT_INTERNAL_URL para usar http://gitea:3000
- Evita problemas de SSL/DNS al acceder desde contenedor
- Mantiene GIT_URL para referencia externa
This commit is contained in:
2025-10-14 00:37:00 -06:00
parent b25b52199e
commit bc8a8de743
2 changed files with 3 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
- PORT=3000 - PORT=3000
- GIT_INTERNAL_URL=http://gitea:3000
- GIT_URL=${GIT_URL} - GIT_URL=${GIT_URL}
- GIT_TOKEN=${GIT_TOKEN} - GIT_TOKEN=${GIT_TOKEN}
networks: networks:

View File

@@ -4,7 +4,8 @@ import express from 'express';
import { z } from 'zod'; import { z } from 'zod';
// Configuración de Gitea // Configuración de Gitea
const GITEA_URL = process.env.GIT_URL || 'https://gitea.nucleoriofrio.com'; // Usar URL interna si está disponible para evitar problemas de SSL/DNS
const GITEA_URL = process.env.GIT_INTERNAL_URL || process.env.GIT_URL || 'https://gitea.nucleoriofrio.com';
const GITEA_TOKEN = process.env.GIT_TOKEN || ''; const GITEA_TOKEN = process.env.GIT_TOKEN || '';
const PORT = parseInt(process.env.PORT || '3000'); const PORT = parseInt(process.env.PORT || '3000');