refactor: 优化缓存目录配置和Dockerfile结构
修改缓存目录配置以支持环境变量覆盖,简化Dockerfile并优化镜像构建步骤 移除冗余权限设置,使用更精简的基础镜像
This commit is contained in:
2
new.js
2
new.js
@@ -9,7 +9,7 @@ const EventEmitter = require('events');
|
||||
// Configuration
|
||||
const PORT = 9520;
|
||||
const API_BASE = 'http://127.0.0.1:9558/api';
|
||||
const CACHE_DIR = path.join(__dirname, '.cache');
|
||||
const CACHE_DIR = process.env.CACHE_DIR ? path.resolve(process.env.CACHE_DIR) : path.join(__dirname, '.cache');
|
||||
|
||||
// Ensure cache directory exists
|
||||
if (!fs.existsSync(CACHE_DIR)) {
|
||||
|
||||
Reference in New Issue
Block a user