# auto-deploy-example **Repository Path**: zhangwei5095/auto-deploy-example ## Basic Information - **Project Name**: auto-deploy-example - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-05-10 - **Last Updated**: 2024-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### **通过Docker Compose部署SpringBoot** ### 下载源码 ```bash yum -y group install "Development Tools" ``` ```bash git clone https://gitee.com/OSABC/automated-deployment-example.git cd automated-deployment-example ``` ### **构建Jar包文件** 创建一个存放`Maven仓库`的卷,使得Maven的依赖被缓存,可加快构建速度。 ```bash docker volume create --name ssadmin-maven-repo ``` 使用 Maven Docker 镜像来编译和打包 Spring Boot 应用。 `pom.xml`文件中增加镜像地址 ```xml huaweicloud huawei https://mirrors.huaweicloud.com/repository/maven/ aliyunmaven aliyun https://maven.aliyun.com/repository/public public aliyun nexus https://maven.aliyun.com/nexus/content/groups/public/ true false ``` ```bash docker run -it --rm --name ssadmin-maven \ -v ssadmin-maven-repo:/root/.m2 \ -v "$PWD/src/springboot-server":/usr/src/mymaven \ -w /usr/src/mymaven \ maven:3.8.4-jdk-8 mvn clean install package -e -Dmaven.test.skip=true ``` ###