From d136ce5150208fa34ab53e194e2d19d17bb0377a Mon Sep 17 00:00:00 2001
From: Yueng <14617246+YuengMeYuuer@user.noreply.gitee.com>
Date: Sat, 27 Jul 2024 13:46:46 +0800
Subject: [PATCH] Dockerfile
---
Dockerfile | 23 +++++++++++++++++++++++
aa | 12 ++++++++++++
pom.xml | 26 +++++++++++++++++++++++++-
3 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 Dockerfile
create mode 100644 aa
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ebbdabd
--- /dev/null
+++ b/Dockerfile
@@ -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"]
diff --git a/aa b/aa
new file mode 100644
index 0000000..9a06c67
--- /dev/null
+++ b/aa
@@ -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/;
+}
diff --git a/pom.xml b/pom.xml
index 7d9dd70..d7edf95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,11 @@
cloud-modules-system系统模块
-
+
+ 17
+ 17
+ UTF-8
+
@@ -92,6 +96,26 @@
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ ${maven.compiler.source}
+ ${maven.compiler.target}
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ true
+
+