diff --git a/consul/config/data-service.json b/consul/config/data-service.json index 16bfa16..149ae67 100644 --- a/consul/config/data-service.json +++ b/consul/config/data-service.json @@ -9,10 +9,8 @@ "id": "data-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.data-service.rule=PathPrefix(\"/api/data\")", - "traefik.http.routers.data-service.entrypoints=web", - "traefik.http.middlewares.data-service-strip.stripprefix.prefixes=/api/data", - "traefik.http.routers.data-service.middlewares=data-service-strip" + "traefik.http.routers.data-service.rule=Host(\"data.aristockai.com\")", + "traefik.http.routers.data-service.entrypoints=web" ], "name": "data-service", "port": 8000 diff --git a/consul/config/emotion-service.json b/consul/config/emotion-service.json index 4346591..0919352 100644 --- a/consul/config/emotion-service.json +++ b/consul/config/emotion-service.json @@ -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=Host(\"emotion.aristockai.com\")", "traefik.http.routers.emotion-service.entrypoints=web" ], "name": "emotion-service", diff --git a/consul/config/frontend.json b/consul/config/frontend.json index 9263a19..e191e41 100644 --- a/consul/config/frontend.json +++ b/consul/config/frontend.json @@ -9,7 +9,7 @@ "id": "frontend-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.frontend.rule=PathPrefix(\"/frontend\")", + "traefik.http.routers.frontend.rule=Host(\"aristockai.com\") || Host(\"www.aristockai.com\")", "traefik.http.routers.frontend.entrypoints=web" ], "name": "frontend", diff --git a/consul/config/quant-service.json b/consul/config/quant-service.json index 521438d..ef7a1ea 100644 --- a/consul/config/quant-service.json +++ b/consul/config/quant-service.json @@ -9,7 +9,7 @@ "id": "quant-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.quant-service.rule=PathPrefix(\"/api/quant\")", + "traefik.http.routers.quant-service.rule=Host(\"quant.aristockai.com\")", "traefik.http.routers.quant-service.entrypoints=web" ], "name": "quant-service", diff --git a/consul/config/recommend-service.json b/consul/config/recommend-service.json index 317ff02..61dfe90 100644 --- a/consul/config/recommend-service.json +++ b/consul/config/recommend-service.json @@ -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=Host(\"recommend.aristockai.com\")", "traefik.http.routers.recommend-service.entrypoints=web" ], "name": "recommend-service", diff --git a/consul/config/user-service.json b/consul/config/user-service.json index dfbbb68..0384d27 100644 --- a/consul/config/user-service.json +++ b/consul/config/user-service.json @@ -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=Host(\"user.aristockai.com\")", "traefik.http.routers.user-service.entrypoints=web" ], "name": "user-service", diff --git a/docker-compose.yml b/docker-compose.yml index f0d786d..babba39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: container_name: ari-data-service restart: always ports: - - "8000:8000" # Traefik dashboard + - "8000:8000" # 错误:应为服务端口注释而非Traefik dashboard networks: - microservice-network environment: