提交 dc5b7cdd 编写于 作者: ibiz4j's avatar ibiz4j

deploy

上级 dfbcb7c6
......@@ -16,9 +16,10 @@ TARGET=PSSYSAPP
</#if>
</#if>
</#if>
FROM ibiz4j/ibizlab-gateway:latest
FROM ibiz4j/ibizlab-gateway:2.4.0.2
ENV TZ=${timezone}
EXPOSE ${httpPort}
WORKDIR /
COPY dist /dist
ADD application-gateway.yml /application-gateway.yml
</#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#if sysrun?? && sysrun.getPSDevSlnMSDepApp()?? && sysrun.getPSDevSlnMSDepApp().getPSDCMSPlatformNode()??>
<#assign deploysys = sys.getName()?lower_case>
<#if sys.getDeploySysId()?? && (sys.getDeploySysId()?length lt 16)>
<#assign deploysys = sys.getDeploySysId()?lower_case>
</#if>
<#assign defaultApi = "api">
<#if app.getPSSysServiceAPI()??>
<#assign defaultApi = app.getPSSysServiceAPI().codeName?lower_case>
<#else>
<#if sys.getAllPSDevSlnMSDepAPIs()??>
<#list sys.getAllPSDevSlnMSDepAPIs() as depSysApi>
<#if depSysApi.getPSSysServiceAPI()?? >
<#assign defaultApi = depSysApi.codeName?lower_case>
<#break>
</#if>
</#list>
</#if>
</#if>
<#assign haswfentity=false>
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#if psDataEntity.hasPSDEWF()?? && psDataEntity.hasPSDEWF()==true>
<#assign haswfentity=true>
<#break>
</#if>
</#list>
spring:
cloud:
gateway:
discovery:
locator:
enabled: false
lowerCaseServiceId: true
routes: #配置网关路由规则
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
- id: cloud_uaa
uri: lb://${r'${ibiz.ref.service.uaa:ibzuaa-api}'}
order: 10
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/v7/**,/${deploysys}__${app.getPKGCodeName()?lower_case}/uaa/**,/${deploysys}__${app.getPKGCodeName()?lower_case}/sysauthlogs
filters:
- StripPrefix=1
- id: ibizcloud_ou
uri: lb://${r'${ibiz.ref.service.ou:ibzou-api}'}
order: 20
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/ibzemployees**,/${deploysys}__${app.getPKGCodeName()?lower_case}/sysemployees**,/${deploysys}__${app.getPKGCodeName()?lower_case}/ibzdepartments**,/${deploysys}__${app.getPKGCodeName()?lower_case}/sysdepartments**,/${deploysys}__${app.getPKGCodeName()?lower_case}/ibzorganizations**,/${deploysys}__${app.getPKGCodeName()?lower_case}/sysorganizations**
filters:
- StripPrefix=1
- id: cloud_oss
uri: lb://${r'${ibiz.ref.service.disk:ibzdisk-api}'}
order: 40
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/ibizutil/**,/${deploysys}__${app.getPKGCodeName()?lower_case}/net-disk/**
filters:
- StripPrefix=1
- id: cloud_conf
uri: lb://${r'${ibiz.ref.service.conf:ibzuaa-api}'}
order: 50
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/configs/**
filters:
- StripPrefix=1
- id: cloud_dict
uri: lb://${r'${ibiz.ref.service.dict:ibzdict-api}'}
order: 60
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/dictionar**/**
filters:
- StripPrefix=1
</#if>
<#if haswfentity==true>
- id: cloud_workflow
uri: lb://${r'${ibiz.ref.service.wf:ibzwf-api}'}
order: 30
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/wfcore/**
filters:
- StripPrefix=1
</#if>
<#assign serviceId="$"+"{ibiz.ref.service."+deploysys+":"+deploysys+"}">
- id: gw-default-appdata
uri: lb://${serviceId}
order: 101
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/appdata<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==2>,/${deploysys}__${app.getPKGCodeName()?lower_case}/v7/**,/${deploysys}__${app.getPKGCodeName()?lower_case}/appdata/ibizutil/**,/${deploysys}__${app.getPKGCodeName()?lower_case}/configs/**</#if>
filters:
- StripPrefix=1
- PrefixPath=/${deploysys}
- id: gw-default-api
uri: lb://${serviceId}
order: 102
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/**
filters:
- StripPrefix=1
- PrefixPath=/${deploysys}/${defaultApi}
- id: gw-default-model
uri: lb://${r'${spring.application.name}'}
order: 101
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/remotemodel/**
filters:
- StripPrefix=2
- PrefixPath=/assets/model
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign serviceId="">
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#assign appEntity=appDataEntity.name?lower_case>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#assign systemName=sys.getCodeName()?lower_case>
<#assign sybSysServiceType=(psDataEntity.getPSSubSysServiceAPI().getServiceType())!''>
<#comment>服务类型为中台和MASA走自身处理</#comment>
<#if psDataEntity.getStorageMode()==4 && (sybSysServiceType!='MIDDLEPLATFORM' && sybSysServiceType!='MASA')>
<#comment>serviceApi模式</#comment>
<#assign serviceId=(psDataEntity.getPSSubSysServiceAPI().getServiceCodeName())!''>
<#assign serviceId="$"+"{ibiz.ref.service."+serviceId?lower_case+":"+serviceId+"}">
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
- id: ${appEntity}
uri: lb://${serviceId}
order: 100
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/${serviceUrl},/${deploysys}__${app.getPKGCodeName()?lower_case}/${serviceUrl}/**
filters:
- StripPrefix=1
- PrefixPath=/${psDataEntity.getPSSubSysServiceAPI().getServiceCodeName()?lower_case}<#if psDataEntity.getPSSubSysServiceAPI().getServicePath()?? && psDataEntity.getPSSubSysServiceAPI().getServicePath()!=''>/psDataEntity.getPSSubSysServiceAPI().getServicePath()</#if>
<#else>
<#assign sysApi=appDataEntity.getPSDEServiceAPI().getPSSysServiceAPI().codeName?lower_case>
<#if sysApi!=defaultApi>
<#assign serviceId="$"+"{ibiz.ref.service."+deploysys?lower_case+":"+deploysys+"}">
- id: ${appEntity}
uri: lb://${serviceId}
order: 100
predicates:
- Path=/${deploysys}__${app.getPKGCodeName()?lower_case}/${serviceUrl},/${deploysys}__${app.getPKGCodeName()?lower_case}/${serviceUrl}/**
filters:
- StripPrefix=1
- PrefixPath=/${deploysys}/${sysApi}
</#if>
</#if>
</#list>
</#if>
\ No newline at end of file
......@@ -84,10 +84,12 @@ TARGET=PSSYSTEM
then
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()}.yaml app_${pub.getPSApplication().getPKGCodeName()}/app/swarm.yaml
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/Dockerfile-APP app_${pub.getPSApplication().getPKGCodeName()}/app/Dockerfile
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/gateway-${pub.getPSApplication().getPKGCodeName()}.yml app_${pub.getPSApplication().getPKGCodeName()}/app/application-gateway.yml
cd app_${pub.getPSApplication().getPKGCodeName()}/app
else
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()}.yaml app_${pub.getPSApplication().getPKGCodeName()}/swarm.yaml
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/Dockerfile-APP app_${pub.getPSApplication().getPKGCodeName()}/Dockerfile
mv -f ${pub.getCodeName()?lower_case}-boot/src/main/docker/gateway-${pub.getPSApplication().getPKGCodeName()}.yml app_${pub.getPSApplication().getPKGCodeName()}/application-gateway.yml
cd app_${pub.getPSApplication().getPKGCodeName()}
fi
<#if depapp.getUserParam("dockerimage","")?? && depapp.getUserParam("dockerimage","")!="">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册