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 user node-red to dialout group #94

Closed
wants to merge 1 commit into from
Closed

Add user node-red to dialout group #94

wants to merge 1 commit into from

Conversation

fightforlife
Copy link

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

This is needed for the Serialport-Node to work properly.
At the moment I do it manually after each update. But I think it would be very convinient for a lot of users to have this baked in. Since the serialport node belongs to the standard nodes of nodered and should work out of the box. New users should be able to directly talk to their serial devices by just adding them to the container with the devies parameter.

See this Issue: #15

I have created a fork and pushed it to the docker hub with just this small change:
https://hub.docker.com/r/fred92/nodered

I tested it successfully with my docker compose file:

version: "2"
services:
  nodered:
    image: fred92/nodered:latest (with useradd dialout)
    #image: nodered/node-red-docker:latest (official, without)
    ports:
      - "9004:1880/tcp"
    restart: always
    volumes:
      - nodered_config:/data
    devices:
      - "/dev/ttyUSB-433:/dev/ttyUSB-433"

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the mailing list/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

This is needed for the Serialport-Node to work properly.
At the moment I do it manually after each update. But I think it would be very convinient also for other users to have this baked in.
See this Issue: #15

Other option could be to use a environment variable for this? 
e.g. which groups the user node-red should belong to.
@fightforlife
Copy link
Author

Any answer to this?

@fightforlife
Copy link
Author

Can be closed.

Found an easier way using docker compose:

group_add: - dialout

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.

1 participant