chore: Add local mock portal for Gateway routing

* AX Portal이 배포되지 않은 상태에서 Gateway가 툴 엔드포인트를 찾지 못하는 문제를 해결하기 위해,
  Nginx 기반의 정적 가짜 포털(portal-mock)을 도입했습니다.
* deploy/docker-compose.yml 에는 MCP_PORTAL_REGISTRY_URL을 portal-mock으로 바라보게 설정하였으며,
  deploy/portal-registry.json 에 하드코딩된 CUS, SAL, PRO, SYS 경로를 제공합니다.
* 향후 실제 AX Portal이 구성되면 docker-compose.yml의 주소를 실제 운영 포털로 변경해야 합니다.
This commit is contained in:
윤희준
2026-08-15 08:47:23 +09:00
parent 189277a78c
commit b1286a6cd2
2 changed files with 60 additions and 0 deletions

32
deploy/docker-compose.yml Normal file
View File

@@ -0,0 +1,32 @@
services:
gateway:
build:
context: ../
dockerfile: Dockerfile
ports:
- "127.0.0.1:9281:8080"
environment:
- TZ=Asia/Seoul
# ====================================================================================
# [AX Portal Mock 연동 설정]
# 현재 AX Portal API 서버가 실제 구동되어 있지 않으므로, Gateway가 엔드포인트를
# 동적으로 받아올 수 있도록 로컬 가짜 포털(portal-mock)을 띄워 라우팅 주소를 제공합니다.
# 향후 실제 AX Portal이 배포되면 아래 주소를 진짜 포털 주소로 변경하시기 바랍니다.
# 예: - MCP_PORTAL_REGISTRY_URL=https://axhub.devjun.net/api/portal/registry
# ====================================================================================
- MCP_PORTAL_REGISTRY_URL=http://portal-mock/api/portal/registry
restart: always
networks:
- prd-dap-net
portal-mock:
image: nginx:alpine
volumes:
- ./portal-registry.json:/usr/share/nginx/html/api/portal/registry:ro
restart: always
networks:
- prd-dap-net
networks:
prd-dap-net:
external: true

View File

@@ -0,0 +1,28 @@
{
"routes": [
{
"routeKey": "cus",
"toolServices": [
{ "status": "ACTIVE", "serviceDomain": "http://was-cus:8084" }
]
},
{
"routeKey": "sal",
"toolServices": [
{ "status": "ACTIVE", "serviceDomain": "http://was-sal:8082" }
]
},
{
"routeKey": "pro",
"toolServices": [
{ "status": "ACTIVE", "serviceDomain": "http://was-pro:8085" }
]
},
{
"routeKey": "sys",
"toolServices": [
{ "status": "ACTIVE", "serviceDomain": "http://was-sys:8086" }
]
}
]
}