secured backend -> made backend internal accessable
This commit is contained in:
@@ -9,6 +9,14 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /backend {
|
||||
return 301 /backend/;
|
||||
}
|
||||
|
||||
location /backend/ {
|
||||
proxy_pass http://borrow_system-backend_v2:8004/;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|mjs|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
|
||||
@@ -16,7 +16,6 @@ import { Box, Flex } from "@chakra-ui/react";
|
||||
import { Footer } from "./components/footer/Footer";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { API_BASE } from "@/config/api.config";
|
||||
import { NotFoundPage } from "./pages/NotFoundPage";
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
@@ -84,7 +83,6 @@ function App() {
|
||||
</Route>
|
||||
|
||||
<Route path="/login" element={<LoginPage />} />
|
||||
<Route path="/not-found" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</UserContext.Provider>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export const NotFoundPage = () => {
|
||||
return (
|
||||
<>
|
||||
|
||||
</>
|
||||
)
|
||||
};
|
||||
@@ -16,8 +16,6 @@ services:
|
||||
backend_v2:
|
||||
container_name: borrow_system-backend_v2
|
||||
build: ./backendV2
|
||||
ports:
|
||||
- "8004:8004"
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DB_HOST: mysql_v2
|
||||
|
||||
Reference in New Issue
Block a user