Files
minio-webui/docker/Dockerfile.backend
T
paul 0087d0fddc fix: Resolve backend logger permission errors
- Fix logger path to use relative path from backend directory
- Add LOG_DIR environment variable support for custom log paths
- Create logs directory with .gitkeep to ensure it exists
- Add docker-entrypoint.sh to handle runtime permissions
- Optimize Dockerfile to set proper permissions for nodejs user
- Ensure logs directory is writable by the application

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 14:01:48 +02:00

40 lines
814 B
Docker

FROM node:20-alpine
# Install MinIO client
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && \
chmod +x mc && \
mv mc /usr/local/bin/
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies
RUN npm ci --only=production
# Copy application files
COPY . .
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001
# Create logs directory with proper permissions
RUN mkdir -p logs && \
chown -R nodejs:nodejs /app && \
chmod 755 logs
# Copy and set permissions for entrypoint
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Switch to non-root user
USER nodejs
# Expose port
EXPOSE 3000
# Start the application
ENTRYPOINT ["docker-entrypoint.sh"]