a91d56751c
- 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>
29 lines
641 B
Bash
Executable File
29 lines
641 B
Bash
Executable File
#!/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" |