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

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

上级 24ef8e71
...@@ -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
...@@ -22,12 +22,12 @@ spec: ...@@ -22,12 +22,12 @@ spec:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-boot:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-boot:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 52000 - containerPort: 51000
env: env:
- name: SPRING_CLOUD_NACOS_DISCOVERY_IP - name: SPRING_CLOUD_NACOS_DISCOVERY_IP
value: "172.16.240.110" value: "172.16.240.110"
- name: SERVER_PORT - name: SERVER_PORT
value: "52000" value: "51000"
- name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR - name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value: "172.16.240.110:8848" value: "172.16.240.110:8848"
- name: SPRING_REDIS_HOST - name: SPRING_REDIS_HOST
...@@ -64,9 +64,9 @@ spec: ...@@ -64,9 +64,9 @@ spec:
type: NodePort type: NodePort
ports: ports:
- name: http - name: http
port: 52000 port: 51000
targetPort: 52000 targetPort: 51000
nodePort: 52000 nodePort: 51000
protocol: TCP protocol: TCP
selector: selector:
app: demo-boot app: demo-boot
...@@ -3,12 +3,12 @@ services: ...@@ -3,12 +3,12 @@ services:
demo-boot: demo-boot:
image: dstimage image: dstimage
ports: ports:
- "52000:52000" - "51000:51000"
networks: networks:
- agent_network - agent_network
environment: environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110 - SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=52000 - SERVER_PORT=51000
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848 - SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_CLOUD_NACOS_CONFIG_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_HOST=172.16.240.110
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册