actualizando uso de secrets en UI
All checks were successful
build-and-deploy / filter (push) Successful in 1s
build-and-deploy / build (push) Successful in 10s
build-and-deploy / deploy (push) Successful in 26s

This commit is contained in:
2025-06-09 16:55:31 -06:00
parent d685fb7ff7
commit de869de3a7
4 changed files with 6 additions and 4 deletions

View File

@@ -32,7 +32,8 @@ services:
image: gitea.interno.com/nucleo000/planilla-ui:latest
build: ./ui
environment:
VITE_API_EVENTS_URL: http://planilla-api:4000/events
VITE_API_EVENTS_URL: https://planilla.interno.com/events
VITE_API_DB_URL: https://planilla.interno.com
ports:
- "3008:80"
networks: [planilla, principal]

View File

@@ -1,4 +1,5 @@
#!/bin/sh
echo "window.RUNTIME_CONFIG = {" > /usr/share/nginx/html/config.js
echo " VITE_API_EVENTS_URL: '${VITE_API_EVENTS_URL}'" >> /usr/share/nginx/html/config.js
echo " VITE_API_DB_URL: '${VITE_API_DB_URL}'" >> /usr/share/nginx/html/config.js
echo "};" >> /usr/share/nginx/html/config.js

View File

@@ -1,8 +1,7 @@
import axios from 'axios';
// forzar subida
const baseURL = 'http://localhost:4000';
// const baseURL = import.meta.env.API_BASE_URL || 'https://planilla.interno.com'
const baseURL = import.meta.env.VITE_API_DB_URL || 'http://localhost:4000';
console.log(baseURL);
const apiClient = axios.create({

View File

@@ -7,7 +7,8 @@ import App from './App.vue'
import './style.css' // Tailwind o tus estilos globales
// console.log(`API_BASE_URL: ${API_BASE_URL}`);
console.log(`VITE_API_EVENTS_URL: ${import.meta.env.VITE_API_EVENTS_URL || 'no definida'}`);
console.log(`VITE_API_DB_URL: ${import.meta.env.VITE_API_DB_URL || 'no definida'}`);
const app = createApp(App)