Dockerfile
parent
4951b15934
commit
d136ce5150
|
@ -0,0 +1,23 @@
|
|||
# |— home
|
||||
# |— app.jar - 启动jar报
|
||||
# |— logs - 日志文件
|
||||
# |— uploadPath - 上传路径
|
||||
#指定构建镜像的起始镜像
|
||||
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
|
||||
|
||||
#执行 一些必备的条件
|
||||
|
||||
#定义时区参数
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
|
||||
|
||||
# 挂在工作目录 You,Moments ago · Uncommitted changes
|
||||
VOLUME ["/home/logs/cloud-system"]
|
||||
|
||||
#拷贝执行jar包文件
|
||||
COPY ./target/cloud-modules-system.jar /home/app.jar
|
||||
|
||||
#构建启动命令
|
||||
ENTRYPOINT ["java","-jar"]
|
||||
CMD ["/home/app.jar"]
|
|
@ -0,0 +1,12 @@
|
|||
location / {
|
||||
root /home/web;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location /prod-api/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
}
|
26
pom.xml
26
pom.xml
|
@ -14,7 +14,11 @@
|
|||
<description>
|
||||
cloud-modules-system系统模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
@ -92,6 +96,26 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- //加入maven deploy插件, 当在deploy时,忽略些model->-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<!-- <version></version>-->
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
Loading…
Reference in New Issue