Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
黄南光
/
wiki_knowledge
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5a3c0a51
authored
Jun 25, 2026
by
黄南光
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_repair_port_1'
# Conflicts: # docker-compose.yml
2 parents
3bb681d4
2fb86513
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
docker-compose.yml
frontend/next.config.ts
frontend/src/app/page.tsx
frontend/src/app/wiki-repo/page.tsx
docker-compose.yml
View file @
5a3c0a5
...
@@ -35,14 +35,13 @@ services:
...
@@ -35,14 +35,13 @@ services:
build
:
build
:
context
:
./frontend
context
:
./frontend
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
args
:
-
NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8104}
container_name
:
wiki-frontend
container_name
:
wiki-frontend
restart
:
always
restart
:
always
depends_on
:
depends_on
:
-
backend
-
backend
environment
:
environment
:
-
NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8104}
# 前端容器内 Next.js server 反代 /api 到后端的内网地址(运行时生效,改地址无需重新构建)
-
BACKEND_INTERNAL_URL=${BACKEND_INTERNAL_URL:-http://backend:8104}
ports
:
ports
:
-
"
3001:3000"
-
"
3001:3000"
...
...
frontend/next.config.ts
View file @
5a3c0a5
...
@@ -2,6 +2,14 @@ import type { NextConfig } from "next";
...
@@ -2,6 +2,14 @@ import type { NextConfig } from "next";
const
nextConfig
:
NextConfig
=
{
const
nextConfig
:
NextConfig
=
{
allowedDevOrigins
:
[
"192.168.1.71"
],
allowedDevOrigins
:
[
"192.168.1.71"
],
async
rewrites
()
{
return
[
{
source
:
"/api/:path*"
,
destination
:
`
${
process
.
env
.
BACKEND_INTERNAL_URL
||
"http://backend:8104"
}
/:path*`
,
},
];
},
};
};
export
default
nextConfig
;
export
default
nextConfig
;
frontend/src/app/page.tsx
View file @
5a3c0a5
...
@@ -179,7 +179,7 @@ export default function EnterpriseWiki() {
...
@@ -179,7 +179,7 @@ export default function EnterpriseWiki() {
// Selection state
// Selection state
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
const API_BASE =
typeof window !== 'undefined' ? `http://${window.location.hostname}:8104` : "http://127.0.0.1:8104
";
const API_BASE =
process.env.NEXT_PUBLIC_API_URL || "/api
";
const fetchFiles = async (page = currentPage, size = pageSize, search = searchQuery, isInitial = false) => {
const fetchFiles = async (page = currentPage, size = pageSize, search = searchQuery, isInitial = false) => {
if (isInitial) setIsInitialLoading(true);
if (isInitial) setIsInitialLoading(true);
...
...
frontend/src/app/wiki-repo/page.tsx
View file @
5a3c0a5
...
@@ -6,7 +6,7 @@ import ReactMarkdown from "react-markdown";
...
@@ -6,7 +6,7 @@ import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkGfm from "remark-gfm";
import { cn } from "@/lib/utils";
import { cn } from "@/lib/utils";
const API_BASE =
typeof window !== 'undefined' ? `http://${window.location.hostname}:8104` : "http://127.0.0.1:8104
";
const API_BASE =
process.env.NEXT_PUBLIC_API_URL || "/api
";
interface TreeNodeData {
interface TreeNodeData {
name: string;
name: string;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment