fix: Add environment variable truncation fix documentation and verification script
- Document the solution for Docker environment variable truncation issue - Add verification script to test the fix - Include proper .env configuration with quoted values - Add Docker network (172.20.0.0/16) to allowed IPs The fix ensures bcrypt hashes and other values with special characters are properly passed to Docker containers without truncation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "========================================"
|
||||
echo "MinIO WebUI - Environment Variable Fix Verification"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
|
||||
# Stop existing containers
|
||||
echo "1. Stopping existing containers..."
|
||||
docker compose -f docker-compose.dev.yml down
|
||||
|
||||
echo ""
|
||||
echo "2. Rebuilding and starting containers..."
|
||||
docker compose -f docker-compose.dev.yml up -d --build
|
||||
|
||||
# Wait for container to start
|
||||
echo ""
|
||||
echo "3. Waiting for containers to start..."
|
||||
sleep 5
|
||||
|
||||
# Check environment variables
|
||||
echo ""
|
||||
echo "4. Checking environment variables in container:"
|
||||
echo "-----------------------------------------------"
|
||||
docker exec minio-webui-backend-dev sh -c 'echo "ADMIN_PASSWORD_HASH length: ${#ADMIN_PASSWORD_HASH}"'
|
||||
docker exec minio-webui-backend-dev sh -c 'echo "ADMIN_PASSWORD_HASH prefix: ${ADMIN_PASSWORD_HASH:0:7}"'
|
||||
docker exec minio-webui-backend-dev sh -c 'echo "JWT_SECRET length: ${#JWT_SECRET}"'
|
||||
docker exec minio-webui-backend-dev sh -c 'echo "ALLOWED_IPS: $ALLOWED_IPS"'
|
||||
|
||||
# Run debug script
|
||||
echo ""
|
||||
echo "5. Running auth debug:"
|
||||
echo "---------------------"
|
||||
./scripts/debug-auth.sh
|
||||
|
||||
# Test API
|
||||
echo ""
|
||||
echo "6. Testing API directly:"
|
||||
echo "-----------------------"
|
||||
./scripts/test-auth-api.sh
|
||||
|
||||
echo ""
|
||||
echo "========================================"
|
||||
echo "Check the outputs above. The password hash should be 60 characters long"
|
||||
echo "and start with '$2b$12$'. If successful, you should be able to log in"
|
||||
echo "with password 'admin123'."
|
||||
echo "========================================"
|
||||
Reference in New Issue
Block a user