Use http_bin_port and make networking clearer

This commit is contained in:
Julian-Samuel Gebühr 2022-07-10 13:33:29 +02:00
parent e62632bf5d
commit ffa20357ea
3 changed files with 16 additions and 2 deletions

View File

@ -36,6 +36,20 @@ matrix_bot_maubot_database_uri: "{{
}[matrix_bot_maubot_database_engine]
}}"
# Defines the port number where the management interface is
# To actually expose the management interface outside of the container, use `matrix_bot_maubot_management_interface_http_bind_port`
matrix_bot_maubot_management_interface_port: 29316
# Controls whether the maubot container exposes its HTTP management interface port (tcp/29316 in the container).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:29316"), or empty string to not expose.
# If you'll be setting this at all, it should be defined in terms of `matrix_bot_maubot_management_interface_port`.
# Example:
# matrix_bot_maubot_management_interface_http_bind_port: "127.0.0.1:{{ matrix_bot_maubot_management_interface_port }}"
matrix_bot_maubot_management_interface_http_bind_port: ''
matrix_bot_maubot_port: 29316
matrix_bot_maubot_unshared_secret: 'generate'

View File

@ -37,7 +37,7 @@
proxy_set_header Connection "upgrade";
{% else %}
{# Generic configuration for use outside of our container setup #}
proxy_pass http://127.0.0.1:{{ matrix_bot_maubot_port }}/$1;
proxy_pass http://127.0.0.1:{{ matrix_bot_maubot_management_interface_port }}/$1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
{% endif %}

View File

@ -27,7 +27,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-maubot \
{% endfor %}
--network={{ matrix_docker_network }} \
{% if matrix_bot_maubot_expose_management_interface|bool %}
-p {{ matrix_bot_maubot_port }}:29316 \
-p {{ matrix_bot_maubot_management_interface_port }}:29316 \
{% endif %}
{{ matrix_bot_maubot_docker_image }} \
python3 -m maubot -c /data/config.yaml