gcgarner / IOTstack

docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.5k stars 578 forks source link

Add Nginx Reverse proxy #174

Open robertcsakany opened 4 years ago

robertcsakany commented 4 years ago

Add support of nginx reverse proxy. It tracking all container where VIRTUAL_HOST env is defined, automatically generate nginx proxy config for it.

As described in https://github.com/nginx-proxy/nginx-proxy. We use separate containers. The HTTPS implementation as documented here: https://medium.com/@francoisromain/host-multiple-websites-with-https-inside-docker-containers-on-a-single-server-18467484ab95

By default the xip.io is used to be able make subdomains for IP address. So for example the nodered service can be accessed:

nodered.X.X.X.X.xip.io

where X.X.X.X is the IP address of IOTstack.

Any other domain can be used, on that case please replace VIRTUAL_HOST env variable of the given instance with the coresponding value.

HTTPS can be used, but xip.io method is not suitable for that, so as the links describes any container can be exposed with the definition of HTTPS proto, but some domain have to be defined.

Slyke commented 4 years ago

I have submitted this PR on your behalf over at the fork: https://github.com/SensorsIot/IOTstack/pull/1, If you would like to have your name to the commits, please submit the PR there and let me know so I can remove the PR I created on your behalf.

enriquedelpino commented 1 year ago

robertcsakany

Hi robert,

I've tried to bring your changes to my personal fork of IOTstack and have them running. After I got the script to generate the entries for the containers you added, I don't see the nginx configuration being generated anywhere, so I was wondering if there is something that needs to be done in order to generate the config correctly.

Paraphraser commented 1 year ago

Hi @enriquedelpino

I've been watching your PR638 on the SensorsIot/IOTstack repo. I'm going to make some more comments there in a bit.

I'm assuming the reason why you've posted this message on gcgarner/IOTstack is because @robertcsakany started working on an nginx proxy here on gcgarner before this repo (gcgarner) was forked to SensorsIot after Graham Garner stopped responding.

There's more background at This Project is Dormant.

PR174 on gcgarner (this PR) was inherited by SensorsIot as PR21 but it is in the same state of having conflicts that must be resolved.

The point I'm trying to make is that this repo (gcgarner) is effectively abandoned so it is highly unlikely that anything you do here will get anywhere. On the other hand, because PR21 on SensorsIot hasn't moved in a very long time, it's probably reasonable to conclude that it is also unlikely to go anywhere.

I'll now move to your PR638 and continue my comments there.