Make FluffyChat container HTTP port configurable

This makes it possible to switch out the container image with one that
uses a port other than 8080.
This commit is contained in:
Slavi Pantaleev
2025-07-10 19:05:42 +03:00
parent e6413534be
commit fb0ccc391e
3 changed files with 9 additions and 3 deletions

View File

@ -33,9 +33,14 @@ matrix_client_fluffychat_container_additional_networks: "{{ matrix_client_fluffy
matrix_client_fluffychat_container_additional_networks_auto: [] matrix_client_fluffychat_container_additional_networks_auto: []
matrix_client_fluffychat_container_additional_networks_custom: [] matrix_client_fluffychat_container_additional_networks_custom: []
# Configures the port number used inside the container image.
matrix_client_fluffychat_container_http_port: 8080
# Controls whether the matrix-client-fluffychat container exposes its HTTP port (tcp/8080 in the container). # Controls whether the matrix-client-fluffychat container exposes its HTTP port (tcp/8080 in the container).
# #
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8765"), or empty string to not expose. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8080"), or empty string to not expose.
#
# Also see: `matrix_client_fluffychat_container_http_port`
matrix_client_fluffychat_container_http_host_bind_port: '' matrix_client_fluffychat_container_http_host_bind_port: ''
# matrix_client_fluffychat_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container. # matrix_client_fluffychat_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
@ -44,6 +49,7 @@ matrix_client_fluffychat_container_http_host_bind_port: ''
# To inject your own other container labels, see `matrix_client_fluffychat_container_labels_additional_labels`. # To inject your own other container labels, see `matrix_client_fluffychat_container_labels_additional_labels`.
matrix_client_fluffychat_container_labels_traefik_enabled: true matrix_client_fluffychat_container_labels_traefik_enabled: true
matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_client_fluffychat_container_network }}" matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_client_fluffychat_container_network }}"
matrix_client_fluffychat_container_labels_traefik_http_service_load_balancer_port: "{{ matrix_client_fluffychat_container_http_port }}"
matrix_client_fluffychat_container_labels_traefik_hostname: "{{ matrix_client_fluffychat_hostname }}" matrix_client_fluffychat_container_labels_traefik_hostname: "{{ matrix_client_fluffychat_hostname }}"
# The path prefix must either be `/` or not end with a slash (e.g. `/fluffychat`). # The path prefix must either be `/` or not end with a slash (e.g. `/fluffychat`).
matrix_client_fluffychat_container_labels_traefik_path_prefix: "{{ matrix_client_fluffychat_path_prefix }}" matrix_client_fluffychat_container_labels_traefik_path_prefix: "{{ matrix_client_fluffychat_path_prefix }}"

View File

@ -11,7 +11,7 @@ traefik.enable=true
traefik.docker.network={{ matrix_client_fluffychat_container_labels_traefik_docker_network }} traefik.docker.network={{ matrix_client_fluffychat_container_labels_traefik_docker_network }}
{% endif %} {% endif %}
traefik.http.services.matrix-client-fluffychat.loadbalancer.server.port=8080 traefik.http.services.matrix-client-fluffychat.loadbalancer.server.port={{ matrix_client_fluffychat_container_labels_traefik_http_service_load_balancer_port }}
{% set middlewares = [] %} {% set middlewares = [] %}

View File

@ -22,7 +22,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--read-only \ --read-only \
--network={{ matrix_client_fluffychat_container_network }} \ --network={{ matrix_client_fluffychat_container_network }} \
{% if matrix_client_fluffychat_container_http_host_bind_port %} {% if matrix_client_fluffychat_container_http_host_bind_port %}
-p {{ matrix_client_fluffychat_container_http_host_bind_port }}:8080 \ -p {{ matrix_client_fluffychat_container_http_host_bind_port }}:{{ matrix_client_fluffychat_container_http_port }} \
{% endif %} {% endif %}
--label-file={{ matrix_client_fluffychat_data_path }}/labels \ --label-file={{ matrix_client_fluffychat_data_path }}/labels \
--tmpfs=/tmp:rw,noexec,nosuid,size=10m \ --tmpfs=/tmp:rw,noexec,nosuid,size=10m \