Files
minio-webui/docker/Dockerfile.backend.dev
T
paul 93d9c47ad5 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>
2025-07-24 09:35:03 +02:00

50 lines
1.3 KiB
Docker

FROM node:20-alpine
# Install MinIO client (detect architecture)
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g') && \
wget https://dl.min.io/client/mc/release/linux-${ARCH}/mc && \
chmod +x mc && \
mv mc /usr/local/bin/
# Install development dependencies
RUN apk add --no-cache bash
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install build tools for compilation (keep them in dev environment)
RUN apk add --no-cache python3 make g++
# Install all dependencies (including devDependencies for development)
# Make sure NODE_ENV is not set to production during install
RUN NODE_ENV=development npm install && \
npm rebuild bcrypt --build-from-source
# Create necessary directories
RUN mkdir -p logs /tmp/minio-webui-temp && \
chmod 755 logs /tmp/minio-webui-temp
# Copy application files
COPY . .
# Copy and run mc config initialization script
COPY init-mc-config.sh /tmp/init-mc-config.sh
RUN chmod +x /tmp/init-mc-config.sh && /tmp/init-mc-config.sh && rm /tmp/init-mc-config.sh
# Change ownership of everything to node user (built-in)
RUN chown -R node:node /app
# Switch to non-root user
USER node
# Set development environment
ENV NODE_ENV=development
# Expose port
EXPOSE 7510
# Start the application in development mode
CMD ["npm", "run", "dev"]