From 765c6f00217aa68df3d7bfef6fd39f77a7a2d647 Mon Sep 17 00:00:00 2001 From: liu <362165265@qq.com> Date: Tue, 3 Feb 2026 11:47:48 +0800 Subject: [PATCH] Update docker-compose.yml to use user home directory for data and logs mapping; fix CSS and JS file paths in index.html for consistent resource loading. --- docker-compose.yml | 5 +++-- src/main/resources/static/index.html | 4 ++-- src/main/resources/templates/index.html | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ee4ab10..57902ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,9 @@ services: ports: - "48081:48081" volumes: - - ./data:/app/data - - ./logs:/app/logs + # 默认映射到用户家目录(Linux/Mac 为 $HOME,未设置时为当前目录) + - ${HOME:-.}/sftp-manager/data:/app/data + - ${HOME:-.}/sftp-manager/logs:/app/logs environment: - SPRING_PROFILES_ACTIVE=prod restart: unless-stopped diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 51bb5d8..9e8e2f8 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -5,7 +5,7 @@ SFTP文件管理器 - +
@@ -173,6 +173,6 @@ - + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 13206b9..7a2e81f 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,7 +5,7 @@ SFTP文件管理器 - +
@@ -160,6 +160,6 @@ - +