diff --git a/consul/config/dev/data-service.json b/consul/config/dev/data-service.json index 149ae67..69d5d4a 100644 --- a/consul/config/dev/data-service.json +++ b/consul/config/dev/data-service.json @@ -8,10 +8,12 @@ }, "id": "data-service-1", "tags": [ - "traefik.enable=true", - "traefik.http.routers.data-service.rule=Host(\"data.aristockai.com\")", - "traefik.http.routers.data-service.entrypoints=web" - ], + "traefik.enable=true", + "traefik.http.routers.data-service.rule=PathPrefix(`/api/data`) || PathPrefix(`/api/public`)", + "traefik.http.routers.data-service.entrypoints=web", + "traefik.http.middlewares.data-service-stripprefix.stripprefix.prefixes=/api/data,/api/public", + "traefik.http.routers.data-service.middlewares=data-service-stripprefix@consulcatalog" + ], "name": "data-service", "port": 8000 } diff --git a/consul/config/dev/emotion-service.json b/consul/config/dev/emotion-service.json index 0919352..1371776 100644 --- a/consul/config/dev/emotion-service.json +++ b/consul/config/dev/emotion-service.json @@ -9,8 +9,10 @@ "id": "emotion-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.emotion-service.rule=Host(\"emotion.aristockai.com\")", - "traefik.http.routers.emotion-service.entrypoints=web" + "traefik.http.routers.emotion-service.rule=PathPrefix(`/api/emotion`) || PathPrefix(`/api/sentiment`)", + "traefik.http.routers.emotion-service.entrypoints=web", + "traefik.http.middlewares.emotion-service-stripprefix.stripprefix.prefixes=/api/emotion,/api/sentiment", + "traefik.http.routers.emotion-service.middlewares=emotion-service-stripprefix@consulcatalog" ], "name": "emotion-service", "port": 8002 diff --git a/consul/config/dev/frontend.json b/consul/config/dev/frontend.json index e191e41..03e5b30 100644 --- a/consul/config/dev/frontend.json +++ b/consul/config/dev/frontend.json @@ -9,7 +9,7 @@ "id": "frontend-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.frontend.rule=Host(\"aristockai.com\") || Host(\"www.aristockai.com\")", + "traefik.http.routers.frontend.rule=PathPrefix(`/`) || PathPrefix(`/index.html`) || PathPrefix(`/static`)", "traefik.http.routers.frontend.entrypoints=web" ], "name": "frontend", diff --git a/consul/config/dev/quant-service.json b/consul/config/dev/quant-service.json index ef7a1ea..5c8b8ef 100644 --- a/consul/config/dev/quant-service.json +++ b/consul/config/dev/quant-service.json @@ -9,8 +9,10 @@ "id": "quant-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.quant-service.rule=Host(\"quant.aristockai.com\")", - "traefik.http.routers.quant-service.entrypoints=web" + "traefik.http.routers.quant-service.rule=PathPrefix(`/api/quant`) || PathPrefix(`/api/strategy`)", + "traefik.http.routers.quant-service.entrypoints=web", + "traefik.http.middlewares.quant-service-stripprefix.stripprefix.prefixes=/api/quant,/api/strategy", + "traefik.http.routers.quant-service.middlewares=quant-service-stripprefix@consulcatalog" ], "name": "quant-service", "port": 8001 diff --git a/consul/config/dev/recommend-service.json b/consul/config/dev/recommend-service.json index 61dfe90..a016ad5 100644 --- a/consul/config/dev/recommend-service.json +++ b/consul/config/dev/recommend-service.json @@ -9,8 +9,10 @@ "id": "recommend-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.recommend-service.rule=Host(\"recommend.aristockai.com\")", - "traefik.http.routers.recommend-service.entrypoints=web" + "traefik.http.routers.recommend-service.rule=PathPrefix(`/api/recommend`) || PathPrefix(`/api/suggest`)", + "traefik.http.routers.recommend-service.entrypoints=web", + "traefik.http.middlewares.recommend-service-stripprefix.stripprefix.prefixes=/api/recommend,/api/suggest", + "traefik.http.routers.recommend-service.middlewares=recommend-service-stripprefix@consulcatalog" ], "name": "recommend-service", "port": 8003 diff --git a/consul/config/dev/user-service.json b/consul/config/dev/user-service.json index 0384d27..3231f67 100644 --- a/consul/config/dev/user-service.json +++ b/consul/config/dev/user-service.json @@ -9,8 +9,10 @@ "id": "user-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.user-service.rule=Host(\"user.aristockai.com\")", - "traefik.http.routers.user-service.entrypoints=web" + "traefik.http.routers.user-service.rule=PathPrefix(`/api/user`) || PathPrefix(`/api/auth`)", + "traefik.http.routers.user-service.entrypoints=web", + "traefik.http.middlewares.user-service-stripprefix.stripprefix.prefixes=/api/user,/api/auth", + "traefik.http.routers.user-service.middlewares=user-service-stripprefix@consulcatalog" ], "name": "user-service", "port": 8004