Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibiz4edge
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7后台标准模板
ibiz4edge
提交
dc5b7cdd
提交
dc5b7cdd
编写于
8月 27, 2022
作者:
ibiz4j
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
deploy
上级
dfbcb7c6
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
155 行增加
和
6 行删除
+155
-6
Dockerfile-APP.ftl
SLN/%PUBPRJ%-boot/src/main/docker/Dockerfile-APP.ftl
+2
-1
gateway-%APP_PKGPATH%.yml.ftl
...UBPRJ%-boot/src/main/docker/gateway-%APP_PKGPATH%.yml.ftl
+146
-0
config.xml.ftl
SLN/config.xml.ftl
+7
-5
未找到文件。
SLN/%PUBPRJ%-boot/src/main/docker/Dockerfile-APP.ftl
浏览文件 @
dc5b7cdd
...
...
@@ -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
SLN/%PUBPRJ%-boot/src/main/docker/gateway-%APP_PKGPATH%.yml.ftl
0 → 100644
浏览文件 @
dc5b7cdd
<#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
SLN/config.xml.ftl
浏览文件 @
dc5b7cdd
...
...
@@ -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","")!="">
...
...
@@ -129,7 +131,7 @@ TARGET=PSSYSTEM
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
else
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
fi
fi
sed -i "s#srcimagename#$para4#g" Dockerfile-MODEL
mv Dockerfile-MODEL Dockerfile
fi
...
...
@@ -145,9 +147,9 @@ TARGET=PSSYSTEM
</#if>
</#if>
</#if>
<#if sysrun.getRunMode() == "STARTMSAPI">
<#if depapi.getUserParam("dockerimage","")?? && depapi.getUserParam("dockerimage","")!="">
cd ${pub.getCodeName()?lower_case}-boot
<#if sysrun.getRunMode() == "STARTMSAPI">
<#if depapi.getUserParam("dockerimage","")?? && depapi.getUserParam("dockerimage","")!="">
cd ${pub.getCodeName()?lower_case}-boot
sed -i "s#dstimage#$para5#g" pom.xml
sed -i "s#dstimage#$para5#g" src/main/docker/${pub.getCodeName()?lower_case}-boot-${pub.getPSSysServiceAPI().getCodeName()?lower_case}.yaml
docker -H $para1 stack deploy --compose-file=src/main/docker/${pub.getCodeName()?lower_case}-boot-${pub.getPSSysServiceAPI().getCodeName()?lower_case}.yaml ${depplatform.getName()} --with-registry-auth
...
...
@@ -177,7 +179,7 @@ TARGET=PSSYSTEM
cd ${pub.getCodeName()?lower_case}-boot
sed -i "s#dstimage#$para5#g" pom.xml
sed -i "s#dstimage#$para5#g" src/main/docker/${pub.getCodeName()?lower_case}-boot-${pub.getPSSysServiceAPI().getCodeName()?lower_case}-k8s.yaml
<#if depapi.getUserParam("multiplatform","")?? && depapi.getUserParam("multiplatform","")=="true">
<#if depapi.getUserParam("multiplatform","")?? && depapi.getUserParam("multiplatform","")=="true">
mvn -Pboot exec:exec@prepare
mvn -Pboot exec:exec@buildpush
<#else>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录