mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Refine Node-RED on NGINX w/o Apache
This commit is contained in:
parent
fa852af6d1
commit
ede56d3197
5 changed files with 18 additions and 40 deletions
|
@ -1,15 +1,5 @@
|
|||
#- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
# set_fact:
|
||||
# apache_install: True
|
||||
# apache_enabled: True
|
||||
|
||||
#- name: APACHE - run 'httpd' role
|
||||
# include_role:
|
||||
# name: httpd
|
||||
|
||||
|
||||
# 2019-01-16: @jvonau's PR #1403 moved installation of Node.js (8.x for now) &
|
||||
# npm to roles/nodejs/tasks/main.yml
|
||||
# 2019-01-16: @jvonau's PR #1403 moved installation of Node.js [8.x at the time]
|
||||
# and npm to roles/nodejs/tasks/main.yml
|
||||
|
||||
- name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'"
|
||||
set_fact:
|
||||
|
@ -48,7 +38,7 @@
|
|||
state: absent
|
||||
when: nodered_install
|
||||
|
||||
# 2012-02-13: the 6 RPi stanzas below recreate Raspbian Desktop's Node-RED
|
||||
# 2019-02-13: the 6 RPi stanzas below recreate Raspbian Desktop's Node-RED
|
||||
# environment, inspired by:
|
||||
# https://nodered.org/docs/hardware/raspberrypi
|
||||
# https://github.com/node-red/raspbian-deb-package/blob/master/resources/update-nodejs-and-nodered
|
||||
|
@ -112,13 +102,6 @@
|
|||
dest: /etc/systemd/system/nodered.service
|
||||
# mode: '0666'
|
||||
|
||||
- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template
|
||||
template:
|
||||
backup: yes
|
||||
src: nodered.conf.j2
|
||||
dest: "/etc/{{ apache_conf_dir }}/nodered.conf"
|
||||
# mode: '0666'
|
||||
|
||||
# SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml
|
||||
#- name: Enable proxy_wstunnel apache2 module
|
||||
# apache2_module:
|
||||
|
|
|
@ -39,14 +39,8 @@
|
|||
state: stopped
|
||||
when: not nodered_enabled
|
||||
|
||||
#- name: Enable/Disable/Restart Apache if primary
|
||||
- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
||||
include_tasks: apache.yml
|
||||
when: not nginx_enabled
|
||||
|
||||
- name: Enable/Disable/Restart NGINX if primary
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
include_tasks: nginx.yml
|
||||
when: nginx_enabled
|
||||
|
||||
|
||||
- name: Add 'nodered' variable values to {{ iiab_ini_file }}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
# 'nodered_port: 1880' is set in /opt/iiab/iiab/vars/default_vars.yml
|
||||
# https://github.com/iiab/iiab/wiki/IIAB-Networking#list-of-ports--services
|
||||
|
||||
location /nodered/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/;
|
||||
}
|
||||
|
||||
location /nodered/debug/ws/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/debug/ws;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/debug/ws;
|
||||
}
|
||||
|
||||
location /nodered/comms/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/comms;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/comms;
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
ProxyPass /{{ nodered_web_path }}/debug/ws ws://localhost:{{ nodered_port }}/{{ nodered_web_path }}/debug/ws
|
||||
ProxyPass /{{ nodered_web_path }}/comms ws://localhost:{{ nodered_port }}/{{ nodered_web_path }}/comms
|
||||
ProxyPass /{{ nodered_web_path }} http://localhost:{{ nodered_port }}/{{ nodered_web_path }}
|
||||
ProxyPassReverse /{{ nodered_web_path }} http://localhost:{{ nodered_port }}/{{ nodered_web_path }}
|
Loading…
Add table
Add a link
Reference in a new issue