fix: Docker 部署优化

- run.sh 改用 exec 直接运行 Java,修复 Docker 中 ShutdownHook 失效
- Dockerfile 预创建 db 和 logs 目录,添加非 root 用户运行
- Docker entrypoint 以 root 运行再降权,解决 volume 权限问题
- EXPOSE 改为仅 6401,entrypoint 添加 -Duser.timezone
This commit is contained in:
yukaidi
2026-05-29 14:23:01 +08:00
parent af723aed3a
commit e36c0bbe45

View File

@@ -1,6 +1,5 @@
#!/bin/bash #!/bin/bash
# set -x # set -x
LAUNCH_JAR="netdisk-fast-download.jar" LAUNCH_JAR="netdisk-fast-download.jar"
nohup java -Xmx512M -jar "$LAUNCH_JAR" "$@" >startup.log 2>&1 & exec java -Xmx${JVM_XMX:-512M} ${JVM_OPTS} -jar "$LAUNCH_JAR" "$@"
tail -f startup.log