actualizando uso de secrets en UI
This commit is contained in:
@@ -32,7 +32,8 @@ services:
|
|||||||
image: gitea.interno.com/nucleo000/planilla-ui:latest
|
image: gitea.interno.com/nucleo000/planilla-ui:latest
|
||||||
build: ./ui
|
build: ./ui
|
||||||
environment:
|
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:
|
ports:
|
||||||
- "3008:80"
|
- "3008:80"
|
||||||
networks: [planilla, principal]
|
networks: [planilla, principal]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "window.RUNTIME_CONFIG = {" > /usr/share/nginx/html/config.js
|
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_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
|
echo "};" >> /usr/share/nginx/html/config.js
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
// forzar subida
|
// forzar subida
|
||||||
|
|
||||||
const baseURL = 'http://localhost:4000';
|
const baseURL = import.meta.env.VITE_API_DB_URL || 'http://localhost:4000';
|
||||||
// const baseURL = import.meta.env.API_BASE_URL || 'https://planilla.interno.com'
|
|
||||||
console.log(baseURL);
|
console.log(baseURL);
|
||||||
|
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import App from './App.vue'
|
|||||||
import './style.css' // Tailwind o tus estilos globales
|
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)
|
const app = createApp(App)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user