Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debugpy as optional #757

Closed
wants to merge 1 commit into from
Closed

Conversation

centerionware
Copy link
Contributor

If DEBUG is set as an environment variable add debugpy and listen on port 5678 for remote debugging.

Pull Request Check List

Resolves: #issue-number-here

  • Added tests for changed code.
  • Updated documentation for changed code.

Description:

If DEBUG is set as an environment variable add debugpy and listen on port 5678 for remote debugging.
@@ -76,7 +76,16 @@ echo "Container Initialization complete."

echo "Starting Riven (Backend)..."
if [ "$PUID" = "0" ]; then
cd /riven/src && poetry run python3 main.py
if [ "${DEBUG}" != "" ]; then # check if DEBUG is set to a truthy value
cd /riven/src && poetry add debugpy && poetry run python3 -m debugpy --listen 0.0.0.0:5678 main.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to open a debugger to the world when running as root?

Copy link
Collaborator

@Gaisberg Gaisberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants