Просмотр исходного кода

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.
pull/4409/head
Slavi Pantaleev 7 месяцев назад
Родитель
Сommit
fb0ccc391e
3 измененных файлов: 9 добавлений и 3 удалений
  1. +7
    -1
      roles/custom/matrix-client-fluffychat/defaults/main.yml
  2. +1
    -1
      roles/custom/matrix-client-fluffychat/templates/labels.j2
  3. +1
    -1
      roles/custom/matrix-client-fluffychat/templates/systemd/matrix-client-fluffychat.service.j2

+ 7
- 1
roles/custom/matrix-client-fluffychat/defaults/main.yml Просмотреть файл

@@ -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_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).
#
# 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_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`.
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_http_service_load_balancer_port: "{{ matrix_client_fluffychat_container_http_port }}"
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`).
matrix_client_fluffychat_container_labels_traefik_path_prefix: "{{ matrix_client_fluffychat_path_prefix }}"


+ 1
- 1
roles/custom/matrix-client-fluffychat/templates/labels.j2 Просмотреть файл

@@ -11,7 +11,7 @@ traefik.enable=true
traefik.docker.network={{ matrix_client_fluffychat_container_labels_traefik_docker_network }}
{% 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 = [] %}



+ 1
- 1
roles/custom/matrix-client-fluffychat/templates/systemd/matrix-client-fluffychat.service.j2 Просмотреть файл

@@ -22,7 +22,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--read-only \
--network={{ matrix_client_fluffychat_container_network }} \
{% 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 %}
--label-file={{ matrix_client_fluffychat_data_path }}/labels \
--tmpfs=/tmp:rw,noexec,nosuid,size=10m \


Загрузка…
Отмена
Сохранить