提交 aee7566c 编写于 作者: ibizdev's avatar ibizdev

MoneyQ 部署微服务接口 [后台服务,接口示例]

上级 5ac69d37
...@@ -55,6 +55,23 @@ ...@@ -55,6 +55,23 @@
git clone -b master $para2 demosys/ git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/ cd demosys/
cd demo-boot
mvn ibizlabcli:code
cd ..
set +e
git config user.name "ibizdev"
git add .
git commit -m "generator before deploy $para5"
git push origin master
git config user.name "root"
set -e
mvn package -Pboot
cd demo-boot
sed -i "s#dstimage#$para5#g" pom.xml
sed -i "s#dstimage#$para5#g" src/main/docker/demo-boot-demoapi.yaml
mvn -Pboot docker:build
mvn -Pboot docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-boot-demoapi.yaml iBizDemo --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /demo-boot.jar java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /demo-boot.jar
EXPOSE 8081 EXPOSE 51000
ADD demo-boot.jar /demo-boot.jar ADD demo-boot.jar /demo-boot.jar
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-boot
labels:
app: demo-boot
spec:
replicas: 1
selector:
matchLabels:
app: demo-boot
template:
metadata:
labels:
app: demo-boot
spec:
imagePullSecrets:
- name: aly-shanghai
containers:
- name: demo-boot
image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-boot:latest
imagePullPolicy: Always
ports:
- containerPort: 51000
env:
- name: SPRING_CLOUD_NACOS_DISCOVERY_IP
value: "172.16.240.110"
- name: SERVER_PORT
value: "51000"
- name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value: "172.16.240.110:8848"
- name: SPRING_REDIS_HOST
value: "172.16.240.110"
- name: SPRING_REDIS_PORT
value: "6379"
- name: SPRING_REDIS_DATABASE
value: "0"
- name: SPRING_DATASOURCE_USERNAME
value: "a_LAB01_df847bdfd"
- name: SPRING_DATASOURCE_PASSWORD
value: "3d6@460A"
- name: SPRING_DATASOURCE_URL
value: "jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true&serverTimezone=GMT%2B8"
- name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
value: "com.mysql.jdbc.Driver"
- name: SPRING_DATASOURCE_DEFAULTSCHEMA
value: "a_LAB01_df847bdfd"
- name: NACOS
value: "172.16.240.110:8848"
- name: SEATA_REGISTRY_NACOS_SERVER-ADDR
value: "172.16.240.110:8848"
- name: SEATA_ENABLED
value: "true"
---
apiVersion: v1
kind: Service
metadata:
name: demo-boot
labels:
app: demo-boot
spec:
type: NodePort
ports:
- name: http
port: 51000
targetPort: 51000
nodePort: 51000
protocol: TCP
selector:
app: demo-boot
version: "3.2"
services:
demo-boot:
image: dstimage
ports:
- "51000:51000"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=51000
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_CLOUD_NACOS_CONFIG_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
- SPRING_DATASOURCE_PASSWORD=3d6@460A
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true&serverTimezone=GMT%2B8
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
memory: 4048M
reservations:
memory: 400M
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
volumes:
- "nfs:/app/file"
volumes:
nfs:
driver: local
driver_opts:
type: "nfs"
o: "addr=172.16.240.140,rw"
device: ":/data/nfs"
networks:
agent_network:
driver: overlay
attachable: true
...@@ -108,10 +108,12 @@ ...@@ -108,10 +108,12 @@
"layout" : "BORDER" "layout" : "BORDER"
}, },
"getPSLayoutPos" : { "getPSLayoutPos" : {
"hAlignSelf" : "LEFT",
"height" : 55, "height" : 55,
"heightMode" : "PX", "heightMode" : "PX",
"layout" : "BORDER", "layout" : "BORDER",
"layoutPos" : "NORTH" "layoutPos" : "NORTH",
"vAlignSelf" : "MIDDLE"
}, },
"getPSPanelItems" : [ { "getPSPanelItems" : [ {
"caption" : "标签页导航栏", "caption" : "标签页导航栏",
......
...@@ -15022,10 +15022,12 @@ ...@@ -15022,10 +15022,12 @@
"layout" : "BORDER" "layout" : "BORDER"
}, },
"getPSLayoutPos" : { "getPSLayoutPos" : {
"hAlignSelf" : "LEFT",
"height" : 55, "height" : 55,
"heightMode" : "PX", "heightMode" : "PX",
"layout" : "BORDER", "layout" : "BORDER",
"layoutPos" : "NORTH" "layoutPos" : "NORTH",
"vAlignSelf" : "MIDDLE"
}, },
"getPSPanelItems" : [ { "getPSPanelItems" : [ {
"caption" : "标签页导航栏", "caption" : "标签页导航栏",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册