mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 03:15:51 +02:00
Fix AlmaLinux 8 installation: Add python-dotenv to requirements
- Install python-dotenv in virtual environment during CyberPanel setup - Fixes Django's inability to load .env file on AlmaLinux 8 - Resolves "Access denied for user 'cyberpanel'@'localhost'" errors - Added to all installation paths (normal, DEV, and after_install) This ensures Django can properly load database credentials from .env file on AlmaLinux 8 systems where python-dotenv was missing.
This commit is contained in:
@@ -68,6 +68,8 @@ rm -rf requirements.txt
|
||||
wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/1.8.0/requirments.txt
|
||||
# Install packages with robust error handling to prevent broken pipe errors
|
||||
safe_pip_install "pip" "requirements.txt" "--ignore-installed"
|
||||
# python-dotenv for Django .env loading (upstream f3437739; critical on some AlmaLinux 8 venvs)
|
||||
pip install python-dotenv 2>/dev/null || echo "⚠️ python-dotenv install skipped or failed"
|
||||
fi
|
||||
|
||||
if [[ $DEV == "ON" ]] ; then
|
||||
@@ -100,6 +102,7 @@ EOF
|
||||
fi
|
||||
|
||||
safe_pip_install "pip3.6" "requirements.txt" "--ignore-installed"
|
||||
pip3.6 install python-dotenv 2>/dev/null || echo "⚠️ python-dotenv (pip3.6) install skipped or failed"
|
||||
fi
|
||||
|
||||
if [ -f requirements.txt ] && [ -d cyberpanel ] ; then
|
||||
|
||||
@@ -50,6 +50,7 @@ EOF
|
||||
fi
|
||||
|
||||
safe_pip_install "pip3.6" "requirements.txt" "--ignore-installed"
|
||||
pip3.6 install python-dotenv 2>/dev/null || echo "⚠️ python-dotenv (after_install) skipped or failed"
|
||||
systemctl restart lscpd
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user