1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-16 18:23:16 +00:00

Clean up frontend logs and document backend URL logging

This commit is contained in:
2025-07-04 12:05:18 +02:00
parent 214f14d689
commit df44573707
4 changed files with 17 additions and 3 deletions
+7 -1
View File
@@ -35,7 +35,13 @@ docker build -t xslt-playground-frontend \
--build-arg VITE_BACKEND_URL=http://localhost:8000 frontend
```
The resulting image serves the static files with nginx on port 80.
The resulting image serves the static files with nginx on port 80. When the
container starts it logs the value of `VITE_BACKEND_URL` so you can confirm the
backend in use in the pod logs:
```
Using this URL as backendURL: http://localhost:8000
```
## Backend
+3 -1
View File
@@ -10,5 +10,7 @@ RUN npm run build
# Stage 2: serve the static files
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["/entrypoint.sh"]
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
# Print backend URL for debugging
echo "Using this URL as backendURL: ${VITE_BACKEND_URL}"
# Execute nginx as main process
exec nginx -g 'daemon off;'
+1 -1
View File
@@ -50,7 +50,6 @@ function injectParamBlock(text, params) {
}
function addParams(text, tab) {
console.log("AQUI!!!!")
const extractedParams = extractParamNames(text);
const existingNames = new Set(tab.params.map(p => p.name));
const newParams = [...tab.params];
@@ -128,6 +127,7 @@ export default function App() {
const [auth, setAuth] = useState(null);
const backendBase = (import.meta.env.VITE_BACKEND_URL || "").replace(/\/$/, "");
console.log("Using this URL as backendURL:", backendBase);
useEffect(() => {
if (goPro) {