CI/CD初始化

master
Number7 2024-07-27 12:31:32 +08:00
parent 6d42175ca1
commit 3ee3c4eca1
2 changed files with 27 additions and 8 deletions

15
Dockerfile 100644
View File

@ -0,0 +1,15 @@
#指定构建镜像的起始镜像
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
#执行一些必备的条件
# home
# app.jar 启动jar包
# logs 日志文件
# uploadPath 上传路径
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
#挂载工作目录
VOLUME ["/home/logs/cloud-file","/home/uploadPath"]
#拷贝执行文件
COPY ./target/cloud-file.jar /home/app.jar
ENTRYPOINT ["java","-jar"]
CMD ["/home/app.jar"]

20
pom.xml
View File

@ -9,12 +9,16 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-modules-file</artifactId> <artifactId>cloud-file</artifactId>
<version>1.0.0</version>
<description> <description>
cloud-modules-file文件服务 cloud-modules-file文件服务
</description> </description>
<dependencies> <dependencies>
<!-- SpringCloud Alibaba Nacos --> <!-- SpringCloud Alibaba Nacos -->
@ -78,13 +82,13 @@
</plugin> </plugin>
<!-- 加入maven deploy插件当在deploy时忽略些model--> <!-- 加入maven deploy插件当在deploy时忽略些model-->
<plugin> <!-- <plugin>-->
<groupId>org.apache.maven.plugins</groupId> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-deploy-plugin</artifactId> <!-- <artifactId>maven-deploy-plugin</artifactId>-->
<configuration> <!-- <configuration>-->
<skip>true</skip> <!-- <skip>true</skip>-->
</configuration> <!-- </configuration>-->
</plugin> <!-- </plugin>-->
</plugins> </plugins>
</build> </build>