Git Product home page Git Product logo

Comments (12)

gcgarner avatar gcgarner commented on May 24, 2024

Hi Echteler

I've done some testing using linuxserver/letsencrypt with some success on nodered, just couldn't get the websockets up upgrade correctly to work with the debugging. I'll add it to #14

from iotstack.

echtelerp avatar echtelerp commented on May 24, 2024

I could help on that one, :-)
just let me know.
you need to add in the docker settings.js file:
httpRoot: '/nodered', httpNodeCors: { origin: "*", methods: "GET,PUT,POST,DELETE" },

in the grafana.ini:
[server] http_port = 3000 domain = {dnsurl}.org root_url = http:// {dnsurl}.org/grafana

then the iginx.conf:
events {} http { server { server_name {dnsurl}.org; listen 80; root /usr/share/nginx/www; index index.html index.htm; location / { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; #proxy_http_version 1.1; #proxy_set_header Upgrade $http_upgrade; #proxy_set_header Connection "upgrade"; proxy_pass http://webserver:80/; } location /nodered/ { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://nodered:1880; } location /influxdb/ { proxy_pass http://influxdb:8086/; } location /grafana/ { proxy_pass http://grafana:3000/; } }
each /servicename:port needs to be adjusted towards the service name of course.

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

I would really appreciate the help, I'm going to have to setup a wiki for the https section. When it comes to opening ports out to the web I want to make sure people follow safe practices. I would like to add some instructions for an ssh tarpit or at least a link. I want to make some headway with the other requests first though.

i think i missed this: httpRoot: '/nodered', httpNodeCors: { origin: "*", methods: "GET,PUT,POST,DELETE" } in settings.js none of the write-ups i found mentioned that

from iotstack.

echtelerp avatar echtelerp commented on May 24, 2024

I had to find all of this out by trial and error :-)
took me about a week.
If you like to I can push that on a repo. so far it is inside a private one, due to some specific configs like vpn keys and stuff...

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

Antonio is busy working on polishing the nodered Dockerfile to get SQLite and serial working. So i would hold off on that for now.

Which image did you use for the nginx proxy, letsencryt? I could always make a branch for testing

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

Hi Philipp I tried adding

httpRoot: '/nodered', httpNodeCors: { origin: "*", methods: "GET,PUT,POST,DELETE" }

into the settings.js file as you suggested but what happened was my nodered just moved to nodered:1880/nodered and i had to change

proxy_pass http://nodered:1880/nodered/; }

this still didn't fix the issue that the websockets don't upgrade to wss so none of the debugging works. Do your debug nodes work with your reverse proxy?

I tested that with linuxserver/letsencrypt but i think i should just use straight nxinx

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

it could be a letsencrypt container issue and i need to set something else

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

Sigh, i have been chasing ghosts. My NAT reflection is the problem. The websockets works fine from the internet but not when I use the domain name from my internal network.

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

I've been doing some work on the reverse-proxy and i've hit a little stumbling block. Home assistant does not support being referenced via a subfolder {url}/hassio does not like it. I've only been able to get it working by subdomain. How would you, via an IP address, get a subdomain?

from iotstack.

echtelerp avatar echtelerp commented on May 24, 2024

Hi gcgarner,
sorry, I have not been online for a couple of days.
so far i have not tried home assistant. so no info to that so far :-)
the thing with the debug node is solved i guess. otherwise, it all worked fine for me.

from iotstack.

echtelerp avatar echtelerp commented on May 24, 2024

From what google says, reverse proxy and Ip adresses with subdomains are not possible, except when you edit the hosts file something ....

from iotstack.

gcgarner avatar gcgarner commented on May 24, 2024

will be added in #14

from iotstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.