fix: Resolve mc config permission error and add MinIO setup documentation

- Replace read-only host mount with dedicated Docker volume for mc config
- Add init-mc-config.sh to initialize mc configuration with proper permissions
- Create setup-mc-alias.sh script to configure MinIO connection
- Add comprehensive MINIO_SETUP.md documentation
- Update docker-compose.dev.yml to use mc-config volume
- Update Dockerfile to run mc config initialization
- Document bcrypt architecture workaround in FIX_ENV_TRUNCATION.md

The mc client can now write to its configuration directory, resolving
the "permission denied" error when connecting to MinIO servers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-23 16:16:55 +02:00
parent c2e7465645
commit a91d56751c
6 changed files with 198 additions and 10 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
# Initialize mc config if needed
MC_CONFIG_DIR="/home/node/.mc"
MC_CONFIG_FILE="$MC_CONFIG_DIR/config.json"
# Create directory if it doesn't exist
if [ ! -d "$MC_CONFIG_DIR" ]; then
echo "Creating mc config directory..."
mkdir -p "$MC_CONFIG_DIR"
fi
# If config doesn't exist, create a basic one
if [ ! -f "$MC_CONFIG_FILE" ]; then
echo "Creating initial mc config..."
cat > "$MC_CONFIG_FILE" << 'EOF'
{
"version": "10",
"aliases": {}
}
EOF
fi
# Ensure proper ownership
chown -R node:node "$MC_CONFIG_DIR"
chmod 755 "$MC_CONFIG_DIR"
chmod 644 "$MC_CONFIG_FILE"
echo "MC config initialized successfully"