mirror of
https://git.ittx.com.cn/office-walle/will_server.git
synced 2026-10-20 17:18:37 +00:00
- 在 wcsApp 模块中添加 com.google.cloud.tools.jib 插件 - 配置 Jib 构建参数包括基础镜像、目标镜像和认证信息 - 设置容器主类为 com.will.wcsApp.WcsAppApplication - 配置容器端口为 8080 并设置时区环境变量 - 在 settings.gradle 中声明 Jib 插件版本依赖
41 lines
1.2 KiB
Groovy
41 lines
1.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot'
|
|
id 'io.spring.dependency-management'
|
|
id 'com.google.cloud.tools.jib'
|
|
}
|
|
|
|
bootJar {
|
|
mainClass = 'com.will.wcsApp.WcsAppApplication'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':coreApi')
|
|
implementation project(':coreData')
|
|
implementation project(':coreAuth')
|
|
implementation project(':coreAgent')
|
|
implementation project(':businessAgent')
|
|
implementation project(':coreJob')
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
|
|
implementation("com.baomidou:mybatis-plus-spring-boot3-starter:3.5.14")
|
|
}
|
|
jib {
|
|
from {
|
|
image = System.getenv('JIB_BASE_IMAGE') ?: 'eclipse-temurin:21-jre'
|
|
}
|
|
to {
|
|
image = System.getenv('JIB_TARGET_IMAGE') ?: 'registry.cn-shanghai.aliyuncs.com/willhub/will-alert-server:latest'
|
|
auth {
|
|
username = System.getenv('ALIYUN_USERNAME') ?: ''
|
|
password = System.getenv('ALIYUN_PASSWORD') ?: ''
|
|
}
|
|
}
|
|
container {
|
|
mainClass = 'com.will.wcsApp.WcsAppApplication'
|
|
ports = ['8080']
|
|
environment = [TZ: 'Asia/Shanghai']
|
|
creationTime = 'USE_CURRENT_TIMESTAMP'
|
|
}
|
|
}
|