feat(docker): enhance Dockerfile and entrypoint for improved package verification and diagnostics

This commit is contained in:
pacnpal
2025-01-28 21:24:00 -05:00
parent f961c66ef0
commit 889f0a943e
4 changed files with 28 additions and 18 deletions

View File

@@ -14,16 +14,22 @@ trap handle_term SIGTERM SIGINT
# Print diagnostic information
echo "Verifying package installation..."
echo "Python path:"
echo "PYTHONPATH environment variable:"
echo $PYTHONPATH
echo "Directory contents of /app/src:"
ls -la /app/src/
echo "Directory contents of /app/src/simpleguardhome:"
ls -la /app/src/simpleguardhome/
echo "Python sys.path:"
python3 -c "import sys; print('\n'.join(sys.path))"
echo "Installed packages:"
pip list
echo "Attempting to import simpleguardhome..."
python3 -c "import simpleguardhome; print('Successfully imported simpleguardhome')" || exit 1
pip list | grep simpleguardhome
echo "Attempting to import and locate simpleguardhome..."
python3 -c "import simpleguardhome, os; print('Found at:', os.path.abspath(simpleguardhome.__file__)); print('Parent dir contents:', os.listdir(os.path.dirname(simpleguardhome.__file__)))" || exit 1
# Start the application
echo "Starting SimpleGuardHome server..."
exec python3 -m simpleguardhome.main
exec python3 -c "from simpleguardhome import start; start()"
# Store child PID
child=$!