Merge "fix testRegister_success" into main
diff --git a/.gitignore b/.gitignore
index a0134b4..a135372 100644
--- a/.gitignore
+++ b/.gitignore
@@ -165,3 +165,4 @@
 # Android studio 3.1+ serialized cache file
 .idea/caches/build_file_checksums.ser
 
+/upload
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..6b47fed
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+# Step 1: 构建 jar
+FROM maven:3.9.9-eclipse-temurin-21 AS builder
+
+WORKDIR /app
+COPY . .
+RUN mvn clean package -DskipTests
+
+FROM nginx:alpine
+
+# 创建运行目录
+WORKDIR /app
+
+# 拷贝 jar 到运行目录
+COPY --from=builder /app/target/*.jar app.jar
+
+RUN mkdir /app/upload/
+
+# 拷贝 Nginx 配置文件
+COPY nginx.conf /etc/nginx/nginx.conf
+
+# 安装 OpenJDK 运行环境
+RUN apk add --no-cache openjdk21-jdk curl
+
+# 后台启动 Spring Boot + 前台运行 Nginx
+EXPOSE 8082
+EXPOSE 8080
+
+CMD java -jar app.jar & nginx -g "daemon off;"
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..dd6cedc
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,20 @@
+worker_processes 1;
+events { worker_connections 1024; }
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    sendfile        on;
+    keepalive_timeout  65;
+
+    server {
+        listen 8082;
+
+        # 1. 代理静态资源:如 http://localhost/static/index.html
+        location /upload/ {
+            alias /app/upload/;
+            autoindex on;
+        }
+    }
+}