fix: Prevent nodemon restarts during policy creation
- Move temp directory outside app folder to /tmp/minio-webui-temp - Add nodemon.json to ignore temp, logs, and node_modules - Add TEMP_DIR environment variable configuration - Add cleanup routine for old temporary policy files (>1 hour) - Update both dev and production Dockerfiles - Update docker-compose configurations This fixes the 500 error during QuickStartWizard policy creation caused by nodemon restarting when temporary files were created. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,10 @@ RUN addgroup -g 1001 -S nodejs && \
|
||||
adduser -S nodejs -u 1001
|
||||
|
||||
# Create necessary directories with proper permissions
|
||||
RUN mkdir -p logs temp && \
|
||||
RUN mkdir -p logs /tmp/minio-webui-temp && \
|
||||
chown -R nodejs:nodejs /app && \
|
||||
chmod 755 logs temp
|
||||
chown nodejs:nodejs /tmp/minio-webui-temp && \
|
||||
chmod 755 logs /tmp/minio-webui-temp
|
||||
|
||||
# Switch to non-root user
|
||||
USER nodejs
|
||||
|
||||
@@ -24,8 +24,8 @@ RUN NODE_ENV=development npm install && \
|
||||
npm rebuild bcrypt --build-from-source
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p logs temp && \
|
||||
chmod 755 logs temp
|
||||
RUN mkdir -p logs /tmp/minio-webui-temp && \
|
||||
chmod 755 logs /tmp/minio-webui-temp
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user