From a21a5bb030640052a55853a9a4c85a9e47dbfe72 Mon Sep 17 00:00:00 2001 From: SainyGb <83477876+SainyGb@users.noreply.github.com> Date: Mon, 25 Aug 2025 22:59:28 -0300 Subject: [PATCH 1/2] fix: duplicate import fix App.jsx (#246) --- frontend/src/App.jsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 65c16bd..b618005 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1,9 +1,6 @@ import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; import { Suspense } from 'react'; -import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; -import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; -import { Suspense } from 'react'; import Home from './pages/Home'; import NotFound from './pages/NotFound'; import CadastroUsuario from './pages/CadastroUsuario'; From c588899c4a168563de6876b28fcf2ac8532492a4 Mon Sep 17 00:00:00 2001 From: SainyGb <83477876+SainyGb@users.noreply.github.com> Date: Mon, 25 Aug 2025 23:56:26 -0300 Subject: [PATCH 2/2] merge(staging): fix vite env import (#248) * fix: duplicate import fix App.jsx * fix: vite env import * chore(env): removed unused variables --- .github/workflows/prod-ci.yml | 1 - docker-compose.prod.yml | 2 -- frontend/src/utils/apiUrl.js | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/prod-ci.yml b/.github/workflows/prod-ci.yml index c1e3d1f..e0a8170 100644 --- a/.github/workflows/prod-ci.yml +++ b/.github/workflows/prod-ci.yml @@ -62,7 +62,6 @@ jobs: echo "BACKEND_IMAGE_TAG=${{ github.sha }}" > .env echo "FRONTEND_IMAGE_TAG=${{ github.sha }}" >> .env echo "REGISTRY_USER=${{ github.repository_owner }}" >> .env - echo "BACK_API_URL=${{ secrets.BACK_API_URL }}" >> .env docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --remove-orphans --build docker image prune -af diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 0fb3419..b73b2d4 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -10,8 +10,6 @@ services: frontend: image: ghcr.io/${REGISTRY_USER}/frontend:${FRONTEND_IMAGE_TAG} - environment: - - VITE_API_URL=${BACK_API_URL} ports: - "8081:80" restart: always diff --git a/frontend/src/utils/apiUrl.js b/frontend/src/utils/apiUrl.js index 466215f..73131f2 100644 --- a/frontend/src/utils/apiUrl.js +++ b/frontend/src/utils/apiUrl.js @@ -1 +1 @@ -export const API_URL = process.env.VITE_API_URL || 'http://localhost:8080'; +export const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8080';