OpenHausIO / connector

Connector between backend & local network
MIT License
1 stars 2 forks source link

Docker image: Forward multicast traffic #19

Closed mStirner closed 1 year ago

mStirner commented 1 year ago

https://stackoverflow.com/questions/37214608/docker-receiving-multicast-traffic https://github.com/moby/libnetwork/issues/2397 https://docs.telosalliance.com/docker-deployment/advanced-docker-topics/networking/multicast-routing-for-host-network https://www.reddit.com/r/docker/comments/o8ywmx/multicast_in_a_container/ https://itecnote.com/tecnote/docker-receiving-multicast-traffic/ https://troglobit.github.io/howtos/multicast/

mStirner commented 1 year ago

https://stackoverflow.com/questions/42422406/receive-udp-multicast-in-docker-container

mStirner commented 1 year ago

https://serverfault.com/q/814259/569434

mStirner commented 1 year ago

Create container (without starting it) and connect it to multiple networks. E.g. start the docker compose without the connector container, connect the container to the host network, and the created docker compose network, then start it and see what happens.

mStirner commented 1 year ago

Put container on host network, use exposed frontend port. The container works as reverse proxy. See quick start guide from: https://docs.open-haus.io/#/administration/quick-start

version: "3"
services:

  database:
    image: mongo
    container_name: database
    hostname: database

  backend:
    image: "openhaus/backend:latest"
    container_name: backend
    hostname: backend
    environment:
      - NODE_ENV=production
      - DATABASE_HOST=database
      - UUID=00000000-0000-0000-0000-000000000000
      - VAULT_MASTER_PASSWORD=Pa$$w0rd
      - USERS_JWT_SECRET=Pa$$W0rd
      - API_AUTH_ENABLED=false
    depends_on:
      - database
    tty: true

  frontend:
    image: "openhaus/frontend:latest"
    container_name: frontend
    hostname: frontend
    ports:
      - "80:80"
      - "443:443"
    depends_on:
      - backend
    environment:
      - BACKEND_HOST=backend
      - NODE_ENV=production

  connector:
    image: "openhaus/connector:latest"
    container_name: connector
    hostname: connector
    environment:
      - NODE_ENV=production
      - BACKEND_HOST=127.0.0.1
      - BACKEND_PORT=80 # Frontend container exposed http port, it works as reverse proxy
      - STARTUP_DELAY=2000
    network_mode: host
    depends_on:
      - frontend
    tty: true