diff --git a/prometheus-alert-manager/tasks/main.yml b/prometheus-alert-manager/tasks/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/smartgears/dataminer_app/templates/wps-config-fixer.j2 b/smartgears/dataminer_app/templates/wps-config-fixer.j2 index 05c7ca6..e14af31 100644 --- a/smartgears/dataminer_app/templates/wps-config-fixer.j2 +++ b/smartgears/dataminer_app/templates/wps-config-fixer.j2 @@ -10,19 +10,14 @@ sed -Ei 's/hostname=\".*\"\ hostport/hostname="{{ hostname }}" hostport/' "$WPS_ sed -Ei 's/hostname=\".*\"\ hostport/hostname="{{ smartgears_hostname }}" hostport/' "$WPS_CONFIG_FILE" {% endif %} -# Fix the port +# Set the port. It is different from the tomcat one if there is a reverse proxy before the service. +# https has the precedence if it is available {% if setup_nginx %} {% if https_port is defined %} -# {% if http_redirect_to_https is defined and http_redirect_to_https %} sed -Ei 's/hostport=\".*\"\ includeDataInputsInResponse/hostport="{{ https_port }}" includeDataInputsInResponse/' "$WPS_CONFIG_FILE" sed -Ei 's/protocol=\".*\"\ hostname/protocol="https" hostname/' "$WPS_CONFIG_FILE" -# {% else %} -# sed -Ei 's/hostport=\".*\"\ includeDataInputsInResponse/hostport="{{ http_port }}" includeDataInputsInResponse/' "$WPS_CONFIG_FILE" -#{% endif %} {% else %} -{% if http_port is defined %} -sed -Ei 's/hostport=\".*\"\ includeDataInputsInResponse/hostport="{{ http_port }}" includeDataInputsInResponse/' "$WPS_CONFIG_FILE" -{% endif %} +sed -Ei 's/hostport=\".*\"\ includeDataInputsInResponse/hostport="{{ http_port | default('80') }}" includeDataInputsInResponse/' "$WPS_CONFIG_FILE" {% endif %} {% else %} sed -Ei 's/hostport=\".*\"\ includeDataInputsInResponse/hostport="{{ item.http_port }}" includeDataInputsInResponse/' "$WPS_CONFIG_FILE"