diff --git a/consul/config/data-service.json b/consul/config/data-service.json index 52ba919..437bd59 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 1818fb5..5d91c51 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 93efea8..a2df057 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 fe78f67..88b2e83 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 923320d..9818eda 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", - "raefik.http.routers.quant-service.rule": "PathPrefix(`/api/recommend`)" + "traefik_http_routers_recommend_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 00cbcc3..a94219e 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", - "raefik.http.routers.quant-service.rule": "PathPrefix(`/api/user`)" + "traefik_http_routers_user_service_rule": "PathPrefix('/api/user')" }, "name": "user-service", "port": 8004 diff --git a/consul/config/whoami.json b/consul/config/whoami.json index 2fb6d29..6d47134 100644 --- a/consul/config/whoami.json +++ b/consul/config/whoami.json @@ -1,23 +1,20 @@ { "service": { "name": "whoami", - "address": "whoami", - "port": 80, "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" + "traefik.http.routers.whoami.rule=Path(`/whoami`)", + "traefik.http.services.whoami.loadbalancer.server.port=80" ], - "check": { - "http": "http://whoami:80/", - "interval": "10s" - } - }, - "middleware": { - "name": "whoami-prefix", - "pathPrefixStrip": { - "prefixes": ["/whoami"] - } + "address": "whoami", + "port": 80, + "checks": [ + { + "http": "http://whoami:80/", + "interval": "10s", + "timeout": "2s" + } + ] } }