diff --git a/consul/config/data-service.json b/consul/config/data-service.json index 437bd59..52ba919 100644 --- a/consul/config/data-service.json +++ b/consul/config/data-service.json @@ -9,7 +9,7 @@ "id": "data-service-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_data_service_rule": "PathPrefix('/api/data')" + "traefik.http.routers.data-service.rule": "PathPrefix('/api/data')" }, "name": "data-service", "port": 8000 diff --git a/consul/config/emotion-service.json b/consul/config/emotion-service.json index 258d5c5..1818fb5 100644 --- a/consul/config/emotion-service.json +++ b/consul/config/emotion-service.json @@ -9,7 +9,7 @@ "id": "emotion-service-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_emotion_service_rule": "PathPrefix(`/api/emotion`)" + "traefik.http.routers.emotion-service.rule": "PathPrefix('/api/emotion')" }, "name": "emotion-service", "port": 8002 diff --git a/consul/config/frontend.json b/consul/config/frontend.json index 51d7769..93efea8 100644 --- a/consul/config/frontend.json +++ b/consul/config/frontend.json @@ -9,7 +9,7 @@ "id": "frontend-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_frontend_rule": "PathPrefix(`/`)" + "traefik.http.routers.frontend.rule": "PathPrefix('/')" }, "name": "frontend", "port": 80 diff --git a/consul/config/quant-service.json b/consul/config/quant-service.json index ed70c98..fe78f67 100644 --- a/consul/config/quant-service.json +++ b/consul/config/quant-service.json @@ -9,7 +9,7 @@ "id": "quant-service-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_quant_service_rule": "PathPrefix(`/api/quant`)" + "traefik.http.routers.quant-service.rule": "PathPrefix('/api/quant')" }, "name": "quant-service", "port": 8001 diff --git a/consul/config/recommend-service.json b/consul/config/recommend-service.json index 897d1c9..923320d 100644 --- a/consul/config/recommend-service.json +++ b/consul/config/recommend-service.json @@ -9,7 +9,7 @@ "id": "recommend-service-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_recommend_service_rule": "PathPrefix(`/api/recommend`)" + "raefik.http.routers.quant-service.rule": "PathPrefix(`/api/recommend`)" }, "name": "recommend-service", "port": 8003 diff --git a/consul/config/user-service.json b/consul/config/user-service.json index 0d96995..00cbcc3 100644 --- a/consul/config/user-service.json +++ b/consul/config/user-service.json @@ -9,7 +9,7 @@ "id": "user-service-1", "meta": { "traefik_enable": "true", - "traefik_http_routers_user_service_rule": "PathPrefix(`/api/user`)" + "raefik.http.routers.quant-service.rule": "PathPrefix(`/api/user`)" }, "name": "user-service", "port": 8004 diff --git a/consul/config/whoami.json b/consul/config/whoami.json index ed690e5..2fb6d29 100644 --- a/consul/config/whoami.json +++ b/consul/config/whoami.json @@ -1,15 +1,23 @@ { "service": { "name": "whoami", + "address": "whoami", "port": 80, - "meta": { - "traefik_enable": "true", - "traefik_http_routers_whoami_rule": "PathPrefix(`/whoami`)", - "traefik_http_routers_whoami_entrypoints": "web" - }, + "tags": [ + "traefik.enable=true", + "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)", + "traefik.http.routers.whoami.entrypoints=web", + "traefik.http.routers.whoami.middlewares=whoami-prefix" + ], "check": { - "http": "http://whoami:80", + "http": "http://whoami:80/", "interval": "10s" } + }, + "middleware": { + "name": "whoami-prefix", + "pathPrefixStrip": { + "prefixes": ["/whoami"] + } } -} \ No newline at end of file +}