fix: Resolve backend permission errors for temp and logs directories

- Fix MinIO service temp directory path (was going to /temp instead of /app/temp)
- Add TEMP_DIR environment variable support
- Make audit logger optional in development mode to avoid permission issues
- Ensure log directory exists before creating loggers
- Update docker-entrypoint.sh to create temp directory
- Create backend/temp directory with .gitkeep
- Update .gitignore to exclude temp files but keep directory structure

This fixes the EACCES permission errors that were causing the backend to restart.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-23 14:22:59 +02:00
parent 9cfd018d0d
commit d99a299bf5
4 changed files with 46 additions and 15 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ const execAsync = util.promisify(exec);
class MinIOService {
constructor(alias = config.minio.defaultAlias) {
this.alias = alias;
this.tempDir = path.join(__dirname, '../../../temp');
this.tempDir = process.env.TEMP_DIR || path.join(__dirname, '../../temp');
this.ensureTempDir();
}