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

Communication with Python script #44

Open
iBobik opened this issue May 5, 2019 · 4 comments
Open

Communication with Python script #44

iBobik opened this issue May 5, 2019 · 4 comments

Comments

@iBobik
Copy link

iBobik commented May 5, 2019

I want to communicate with an RFID reader connected to Pi by GPIO. I am able to process that values by Python script.

How that Python script can send some event to SPA running in Webkit?

@iBobik
Copy link
Author

iBobik commented May 5, 2019

Maybe turning WPE to multicontainer like in #29 and in second container run websocket server available only to other containers, so app in browser can access it over HTTP?

@petrosagg
Copy link
Contributor

@iBobik yeah that's the general idea. Having wpe run as a separate container that gets all its data over HTTP by talking to other containers running next to it

@Controlhaus
Copy link

@iBobik Communicating between containers over a websocket works well.
Here is what our docker-compose.yml looks like to do that:

version: '2.1'
services:
  my-app:
    build: ./my-app
    privileged: true
    restart: always
    depends_on:
      - display
    network_mode: host
  display:
    build: ./wpe
    devices:
      - "/dev/fb0:/dev/fb0"
      - "/dev/vchiq:/dev/vchiq" 
    restart: always
    network_mode: host
@iBobik
Copy link
Author

iBobik commented May 27, 2019 via email

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