refactor(traefik): 统一API路径前缀并调整服务路由规则

- 为traefik仪表板API添加路径前缀/traefik-api
- 将前端服务路由路径从/改为/frontend
- 统一数据服务、用户服务、情感服务和推荐服务的API路径为/api/前缀
This commit is contained in:
fanfpy 2025-07-02 14:44:29 +08:00
parent 3ced301ee1
commit cebc343893
6 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,7 @@
"id": "data-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.data-service.rule=PathPrefix(`/api-data`)",
"traefik.http.routers.data-service.rule=PathPrefix(`/api/data`)",
"traefik.http.routers.data-service.entrypoints=web"
],
"name": "data-service",

View File

@ -9,7 +9,7 @@
"id": "emotion-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.emotion-service.rule=PathPrefix(`/api-emotion`)",
"traefik.http.routers.emotion-service.rule=PathPrefix(`/api/emotion`)",
"traefik.http.routers.emotion-service.entrypoints=web"
],
"name": "emotion-service",

View File

@ -9,7 +9,7 @@
"id": "frontend-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.frontend.rule=PathPrefix(`/`)",
"traefik.http.routers.frontend.rule=PathPrefix(`/frontend`)",
"traefik.http.routers.frontend.entrypoints=web"
],
"name": "frontend",

View File

@ -9,7 +9,7 @@
"id": "recommend-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.recommend-service.rule=PathPrefix(`/api-recommend`)",
"traefik.http.routers.recommend-service.rule=PathPrefix(`/api/recommend`)",
"traefik.http.routers.recommend-service.entrypoints=web"
],
"name": "recommend-service",

View File

@ -9,7 +9,7 @@
"id": "user-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.user-service.rule=PathPrefix(`/api-user`)",
"traefik.http.routers.user-service.rule=PathPrefix(`/api/user`)",
"traefik.http.routers.user-service.entrypoints=web"
],
"name": "user-service",

View File

@ -12,3 +12,4 @@ providers:
api:
dashboard: true
insecure: true
pathPrefix: "/traefik-api"