feat: 添加评价微服务,支持密封互评与订单状态联动
This commit is contained in:
@@ -119,6 +119,8 @@ services:
|
||||
condition: service_started
|
||||
email-api:
|
||||
condition: service_started
|
||||
review-api:
|
||||
condition: service_started
|
||||
|
||||
ratelimit:
|
||||
image: envoyproxy/ratelimit:05c08d03
|
||||
@@ -261,6 +263,19 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
|
||||
review-rpc:
|
||||
image: juwan/review-rpc:dev
|
||||
container_name: juwan-review-rpc
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
snowflake:
|
||||
condition: service_started
|
||||
|
||||
# ==================== API 层 ====================
|
||||
users-api:
|
||||
image: juwan/users-api:dev
|
||||
@@ -371,6 +386,19 @@ services:
|
||||
kafka:
|
||||
condition: service_healthy
|
||||
|
||||
review-api:
|
||||
image: juwan/review-api:dev
|
||||
container_name: juwan-review-api
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
ports:
|
||||
- "18810:8888"
|
||||
depends_on:
|
||||
review-rpc:
|
||||
condition: service_started
|
||||
order-rpc:
|
||||
condition: service_started
|
||||
|
||||
# ==================== MQ ====================
|
||||
email-mq:
|
||||
image: juwan/email-mq:dev
|
||||
|
||||
@@ -321,6 +321,42 @@ static_resources:
|
||||
cluster: objectstory_api_cluster
|
||||
timeout: 30s
|
||||
|
||||
- match:
|
||||
prefix: /api/v1/reviews
|
||||
headers:
|
||||
- name: ":method"
|
||||
exact_match: GET
|
||||
route:
|
||||
cluster: review_api_cluster
|
||||
timeout: 30s
|
||||
typed_per_filter_config:
|
||||
envoy.filters.http.ext_authz:
|
||||
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
|
||||
disabled: true
|
||||
|
||||
- match:
|
||||
safe_regex:
|
||||
google_re2: {}
|
||||
regex: "^/api/v1/users/[0-9]+/reviews$"
|
||||
headers:
|
||||
- name: ":method"
|
||||
exact_match: GET
|
||||
route:
|
||||
cluster: review_api_cluster
|
||||
timeout: 30s
|
||||
typed_per_filter_config:
|
||||
envoy.filters.http.ext_authz:
|
||||
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
|
||||
disabled: true
|
||||
|
||||
- match:
|
||||
safe_regex:
|
||||
google_re2: {}
|
||||
regex: "^/api/v1/orders/[0-9]+/review.*"
|
||||
route:
|
||||
cluster: review_api_cluster
|
||||
timeout: 30s
|
||||
|
||||
- match:
|
||||
prefix: /
|
||||
direct_response:
|
||||
@@ -565,6 +601,18 @@ static_resources:
|
||||
headers:
|
||||
- name: ":method"
|
||||
exact_match: GET
|
||||
- match:
|
||||
prefix: /api/v1/reviews
|
||||
headers:
|
||||
- name: ":method"
|
||||
exact_match: GET
|
||||
- match:
|
||||
safe_regex:
|
||||
google_re2: {}
|
||||
regex: "^/api/v1/users/[0-9]+/reviews$"
|
||||
headers:
|
||||
- name: ":method"
|
||||
exact_match: GET
|
||||
- match:
|
||||
prefix: /api/v1
|
||||
requires:
|
||||
@@ -728,6 +776,20 @@ static_resources:
|
||||
address: objectstory-api
|
||||
port_value: 8888
|
||||
|
||||
- name: review_api_cluster
|
||||
connect_timeout: 2s
|
||||
type: STRICT_DNS
|
||||
lb_policy: ROUND_ROBIN
|
||||
load_assignment:
|
||||
cluster_name: review_api_cluster
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: review-api
|
||||
port_value: 8888
|
||||
|
||||
- name: authz_adapter_cluster
|
||||
connect_timeout: 0.5s
|
||||
type: STRICT_DNS
|
||||
|
||||
Reference in New Issue
Block a user