|
14 | 14 | <parent> |
15 | 15 | <artifactId>opensabre-base-dependencies</artifactId> |
16 | 16 | <groupId>io.github.opensabre</groupId> |
17 | | - <version>0.1.0</version> |
| 17 | + <version>0.1.1</version> |
18 | 18 | </parent> |
19 | 19 |
|
20 | 20 | <properties> |
|
37 | 37 | <groupId>io.github.opensabre</groupId> |
38 | 38 | <artifactId>opensabre-starter-rpc</artifactId> |
39 | 39 | </dependency> |
| 40 | + <dependency> |
| 41 | + <groupId>org.apache.httpcomponents.client5</groupId> |
| 42 | + <artifactId>httpclient5</artifactId> |
| 43 | + <version>5.4.1</version> |
| 44 | + </dependency> |
40 | 45 | <dependency> |
41 | 46 | <groupId>io.github.opensabre</groupId> |
42 | 47 | <artifactId>opensabre-starter-cache</artifactId> |
|
99 | 104 | <plugin> |
100 | 105 | <groupId>com.google.cloud.tools</groupId> |
101 | 106 | <artifactId>jib-maven-plugin</artifactId> |
102 | | - <version>3.4.6</version> |
| 107 | + <dependencies> |
| 108 | + <!-- 添加所有权扩展 --> |
| 109 | + <dependency> |
| 110 | + <groupId>com.google.cloud.tools</groupId> |
| 111 | + <artifactId>jib-ownership-extension-maven</artifactId> |
| 112 | + <version>0.1.0</version> |
| 113 | + </dependency> |
| 114 | + </dependencies> |
103 | 115 | <configuration> |
| 116 | + <pluginExtensions> |
| 117 | + <pluginExtension> |
| 118 | + <implementation>com.google.cloud.tools.jib.maven.extension.ownership.JibOwnershipExtension</implementation> |
| 119 | + <configuration implementation="com.google.cloud.tools.jib.maven.extension.ownership.Configuration"> |
| 120 | + <rules> |
| 121 | + <rule> |
| 122 | + <glob>/app/logs/**</glob> |
| 123 | + <ownership>1001</ownership> |
| 124 | + </rule> |
| 125 | + </rules> |
| 126 | + </configuration> |
| 127 | + </pluginExtension> |
| 128 | + </pluginExtensions> |
104 | 129 | <!-- 基础镜像 --> |
105 | 130 | <from> |
106 | 131 | <image>docker.1ms.run/eclipse-temurin:21-jre-alpine</image> |
107 | 132 | </from> |
108 | | - <!-- 目标镜像 --> |
109 | 133 | <to> |
110 | | - <image>opensabre/${project.artifactId}:${project.version}</image> |
| 134 | + <image>${REGISTRY_URL}/${project.artifactId}:${project.version}</image> |
| 135 | + <auth> |
| 136 | + <username>${secret.id}</username> |
| 137 | + <password>${secret.key}</password> |
| 138 | + </auth> |
| 139 | + <tags> |
| 140 | + <tag>latest</tag> |
| 141 | + <tag>${project.version}</tag> |
| 142 | + </tags> |
111 | 143 | </to> |
112 | | - <!-- 容器配置 --> |
113 | 144 | <container> |
114 | | - <user>1000</user> |
115 | | - <workingDirectory>/app</workingDirectory> |
116 | | - <mainClass>io.github.opensabre.authorization.Oauth2AuthorizationApplication</mainClass> |
117 | | - <ports> |
118 | | - <port>8000</port> |
119 | | - </ports> |
120 | | - <jvmFlags>-XX:+UseContainerSupport</jvmFlags> |
121 | | - <creationTime>USE_CURRENT_TIMESTAMP</creationTime> |
| 145 | + <volumes> |
| 146 | + <volume>/app/logs</volume> |
| 147 | + </volumes> |
| 148 | + <!-- 设置环境变量 --> |
| 149 | + <environment> |
| 150 | + <!-- 设置时区 --> |
| 151 | + <TZ>Asia/Shanghai</TZ> |
| 152 | + </environment> |
122 | 153 | </container> |
123 | 154 | </configuration> |
124 | 155 | </plugin> |
|
0 commit comments