Compare commits

..

No commits in common. "master" and "分库分表" have entirely different histories.

3 changed files with 1 additions and 30 deletions

View File

@ -3,7 +3,7 @@ type: docker
name: jar-deploy
trigger:
event: [ push ]
branch: [ master ]
branch: [ main ]
steps:
- name: build-package
image: maven:3.8-openjdk-8

View File

@ -1,5 +0,0 @@
FROM openjdk:8
VOLUME /tmp
ADD scenic-1.0-SNAPSHOT.jar app.jar
EXPOSE 8081
ENTRYPOINT ["java","-jar","app.jar"]

24
run.sh
View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 定义应用组名
group_name='xyy'
# 定义应用名称
app_name='init'
# 定义应用版本
app_version='latest'
# 定义应用环境
profile_active='dev'
echo '----copy jar----'
docker stop ${app_name}
echo '----stop container----'
docker rm ${app_name}
echo '----rm container----'
docker rmi ${group_name}/${app_name}:${app_version}
echo '----rm image----'
# 打包编译docker镜像
docker build -t ${group_name}/${app_name}:${app_version} .
echo '----build image----'
docker run -p 0504:8081 --name ${app_name} \
-e TZ="Asia/Shanghai" \
-v /etc/localtime:/etc/localtime \
-d ${group_name}/${app_name}:${app_version}
echo '----start container----'