You've already forked matrix-docker-ansible-deploy
mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-08-10 21:52:20 +02:00
add SchildiChat client
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": {{ matrix_client_schildichat_default_hs_url | string | to_json }},
|
||||
"server_name": {{ matrix_client_schildichat_default_server_name | string | to_json }}
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": {{ matrix_client_schildichat_default_is_url | string | to_json }}
|
||||
}
|
||||
},
|
||||
"setting_defaults": {
|
||||
"custom_themes": {{ matrix_client_schildichat_setting_defaults_custom_themes | to_json }}
|
||||
},
|
||||
"default_theme": {{ matrix_client_schildichat_default_theme | string | to_json }},
|
||||
"default_country_code": {{ matrix_client_schildichat_default_country_code | string | to_json }},
|
||||
"permalink_prefix": {{ matrix_client_schildichat_permalink_prefix | string | to_json }},
|
||||
"disable_custom_urls": {{ matrix_client_schildichat_disable_custom_urls | to_json }},
|
||||
"disable_guests": {{ matrix_client_schildichat_disable_guests | to_json }},
|
||||
"brand": {{ matrix_client_schildichat_brand | to_json }},
|
||||
"integrations_ui_url": {{ matrix_client_schildichat_integrations_ui_url | string | to_json }},
|
||||
"integrations_rest_url": {{ matrix_client_schildichat_integrations_rest_url | string | to_json }},
|
||||
"integrations_widgets_urls": {{ matrix_client_schildichat_integrations_widgets_urls | to_json }},
|
||||
"integrations_jitsi_widget_url": {{ matrix_client_schildichat_integrations_jitsi_widget_url | string | to_json }},
|
||||
"bug_report_endpoint_url": {{ matrix_client_schildichat_bug_report_endpoint_url | to_json }},
|
||||
"show_labs_settings": {{ matrix_client_schildichat_show_lab_settings | to_json }},
|
||||
"room_directory": {
|
||||
"servers": {{ matrix_client_schildichat_room_directory_servers | to_json }}
|
||||
},
|
||||
"welcome_user_id": {{ matrix_client_schildichat_welcome_user_id | to_json }},
|
||||
{% if matrix_client_schildichat_enable_presence_by_hs_url is not none %}
|
||||
"enable_presence_by_hs_url": {{ matrix_client_schildichat_enable_presence_by_hs_url | to_json }},
|
||||
{% endif %}
|
||||
"embedded_pages": {
|
||||
"homeUrl": {{ matrix_client_schildichat_embedded_pages_home_url | string | to_json }}
|
||||
},
|
||||
{% if matrix_client_schildichat_jitsi_preferred_domain %}
|
||||
"jitsi": {
|
||||
"preferred_domain": {{ matrix_client_schildichat_jitsi_preferred_domain | to_json }}
|
||||
},
|
||||
{% endif %}
|
||||
{% if matrix_client_schildichat_location_sharing_enabled %}
|
||||
"map_style_url": "https://{{ matrix_server_fqn_schildichat }}/map_style.json",
|
||||
{% endif %}
|
||||
"branding": {
|
||||
"auth_footer_links": {{ matrix_client_schildichat_branding_auth_footer_links | to_json }},
|
||||
"auth_header_logo_url": {{ matrix_client_schildichat_branding_auth_header_logo_url | to_json }},
|
||||
"welcome_background_url": {{ matrix_client_schildichat_branding_welcome_background_url | to_json }}
|
||||
}
|
||||
}
|
45
roles/custom/matrix-client-schildichat/templates/labels.j2
Normal file
45
roles/custom/matrix-client-schildichat/templates/labels.j2
Normal file
@@ -0,0 +1,45 @@
|
||||
{% if matrix_client_schildichat_container_labels_traefik_enabled %}
|
||||
traefik.enable=true
|
||||
|
||||
{% if matrix_client_schildichat_container_labels_traefik_docker_network %}
|
||||
traefik.docker.network={{ matrix_client_schildichat_container_labels_traefik_docker_network }}
|
||||
{% endif %}
|
||||
|
||||
{% set middlewares = [] %}
|
||||
|
||||
{% if matrix_client_schildichat_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-client-schildichat-slashless-redirect.redirectregex.regex=({{ matrix_client_schildichat_container_labels_traefik_path_prefix | quote }})$
|
||||
traefik.http.middlewares.matrix-client-schildichat-slashless-redirect.redirectregex.replacement=${1}/
|
||||
{% set middlewares = middlewares + ['matrix-client-schildichat-slashless-redirect'] %}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_client_schildichat_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-client-schildichat-strip-prefix.stripprefix.prefixes={{ matrix_client_schildichat_container_labels_traefik_path_prefix }}
|
||||
{% set middlewares = middlewares + ['matrix-client-schildichat-strip-prefix'] %}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_client_schildichat_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
|
||||
{% for name, value in matrix_client_schildichat_container_labels_traefik_additional_response_headers.items() %}
|
||||
traefik.http.middlewares.matrix-client-schildichat-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
|
||||
{% endfor %}
|
||||
{% set middlewares = middlewares + ['matrix-client-schildichat-add-headers'] %}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-client-schildichat.rule={{ matrix_client_schildichat_container_labels_traefik_rule }}
|
||||
{% if matrix_client_schildichat_container_labels_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.matrix-client-schildichat.priority={{ matrix_client_schildichat_container_labels_traefik_priority }}
|
||||
{% endif %}
|
||||
traefik.http.routers.matrix-client-schildichat.service=matrix-client-schildichat
|
||||
{% if middlewares | length > 0 %}
|
||||
traefik.http.routers.matrix-client-schildichat.middlewares={{ middlewares | join(',') }}
|
||||
{% endif %}
|
||||
traefik.http.routers.matrix-client-schildichat.entrypoints={{ matrix_client_schildichat_container_labels_traefik_entrypoints }}
|
||||
traefik.http.routers.matrix-client-schildichat.tls={{ matrix_client_schildichat_container_labels_traefik_tls | to_json }}
|
||||
{% if matrix_client_schildichat_container_labels_traefik_tls %}
|
||||
traefik.http.routers.matrix-client-schildichat.tls.certResolver={{ matrix_client_schildichat_container_labels_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.services.matrix-client-schildichat.loadbalancer.server.port=8080
|
||||
{% endif %}
|
||||
|
||||
{{ matrix_client_schildichat_container_labels_additional_labels }}
|
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"layers": [
|
||||
{
|
||||
"id": "locallayer",
|
||||
"source": "localsource",
|
||||
"type": "raster"
|
||||
}
|
||||
],
|
||||
"sources": {
|
||||
"localsource": {
|
||||
"attribution": {{ matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_attribution|to_json }},
|
||||
"tileSize": 256,
|
||||
"tiles": {{ matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles|to_json }},
|
||||
"type": "raster"
|
||||
}
|
||||
},
|
||||
"version": 8
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=Matrix schildichat server
|
||||
{% for service in matrix_client_schildichat_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-client-schildichat 2>/dev/null || true'
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-schildichat 2>/dev/null || true'
|
||||
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--rm \
|
||||
--name=matrix-client-schildichat \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--read-only \
|
||||
--network={{ matrix_client_schildichat_container_network }} \
|
||||
{% if matrix_client_schildichat_container_http_host_bind_port %}
|
||||
-p {{ matrix_client_schildichat_container_http_host_bind_port }}:8080 \
|
||||
{% endif %}
|
||||
--label-file={{ matrix_client_schildichat_data_path }}/labels \
|
||||
--tmpfs=/tmp:rw,noexec,nosuid,size=10m \
|
||||
--mount type=bind,src={{ matrix_client_schildichat_data_path }}/config.json,dst=/app/config.json,ro \
|
||||
--mount type=bind,src={{ matrix_client_schildichat_data_path }}/config.json,dst=/app/config.{{ matrix_server_fqn_schildichat }}.json,ro \
|
||||
{% if matrix_client_schildichat_location_sharing_enabled %}
|
||||
--mount type=bind,src={{ matrix_client_schildichat_data_path }}/map_style.json,dst=/app/map_style.json,ro \
|
||||
{% endif %}
|
||||
{% if matrix_client_schildichat_embedded_pages_home_path is not none %}
|
||||
--mount type=bind,src={{ matrix_client_schildichat_data_path }}/home.html,dst=/app/home.html,ro \
|
||||
{% endif %}
|
||||
--mount type=bind,src={{ matrix_client_schildichat_data_path }}/welcome.html,dst=/app/welcome.html,ro \
|
||||
{% for arg in matrix_client_schildichat_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_client_schildichat_docker_image }}
|
||||
|
||||
{% for network in matrix_client_schildichat_container_additional_networks %}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-client-schildichat
|
||||
{% endfor %}
|
||||
|
||||
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-client-schildichat
|
||||
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-client-schildichat 2>/dev/null || true'
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-schildichat 2>/dev/null || true'
|
||||
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-client-schildichat
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
205
roles/custom/matrix-client-schildichat/templates/welcome.html.j2
Normal file
205
roles/custom/matrix-client-schildichat/templates/welcome.html.j2
Normal file
@@ -0,0 +1,205 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
<style type="text/css">
|
||||
|
||||
/* we deliberately inline style here to avoid flash-of-CSS problems, and to avoid
|
||||
* voodoo where we have to set display: none by default
|
||||
*/
|
||||
|
||||
h1::after {
|
||||
content: "!";
|
||||
}
|
||||
|
||||
.mx_Parent {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 25px 35px;
|
||||
color: #2e2f32;
|
||||
}
|
||||
|
||||
.mx_Logo {
|
||||
height: 54px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.mx_ButtonGroup {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mx_ButtonRow {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-justify-content: space-around;
|
||||
-ms-flex-pack: distribute;
|
||||
justify-content: space-around;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > * {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > *:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > *:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mx_ButtonParent {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
padding: 10px 20px;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
width: 150px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px center;
|
||||
text-decoration: none;
|
||||
color: #2e2f32 !important;
|
||||
}
|
||||
|
||||
.mx_ButtonLabel {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.mx_Header_title {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
|
||||
.mx_Header_subtitle {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
|
||||
.mx_ButtonSignIn {
|
||||
background-color: #368BD6;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mx_ButtonCreateAccount {
|
||||
background-color: #0DBD8B;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mx_SecondaryButton {
|
||||
background-color: #FFFFFF;
|
||||
color: #2E2F32;
|
||||
}
|
||||
|
||||
.mx_Button_iconSignIn {
|
||||
background-image: url('welcome/images/icon-sign-in.svg');
|
||||
}
|
||||
.mx_Button_iconCreateAccount {
|
||||
background-image: url('welcome/images/icon-create-account.svg');
|
||||
}
|
||||
.mx_Button_iconHelp {
|
||||
background-image: url('welcome/images/icon-help.svg');
|
||||
}
|
||||
.mx_Button_iconRoomDirectory {
|
||||
background-image: url('welcome/images/icon-room-directory.svg');
|
||||
}
|
||||
|
||||
/*
|
||||
.mx_WelcomePage_loggedIn is applied by EmbeddedPage from the Welcome component
|
||||
If it is set on the page, we should show the buttons. Otherwise, we have to assume
|
||||
we don't have an account and should hide them. No account == no guest account either.
|
||||
*/
|
||||
.mx_WelcomePage:not(.mx_WelcomePage_loggedIn) .mx_WelcomePage_guestFunctions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mx_ButtonRow.mx_WelcomePage_guestFunctions {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.mx_ButtonRow.mx_WelcomePage_guestFunctions > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.mx_ButtonRow {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > * {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="mx_Parent">
|
||||
<a href="{{ matrix_client_schildichat_welcome_logo_link }}" target="_blank" rel="noopener">
|
||||
<img src="{{ matrix_client_schildichat_welcome_logo }}" alt="" class="mx_Logo"/>
|
||||
</a>
|
||||
<h1 class="mx_Header_title">{{ matrix_client_schildichat_welcome_headline }}</h1>
|
||||
<h4 class="mx_Header_subtitle">{{ matrix_client_schildichat_welcome_text }}</h4>
|
||||
<div class="mx_ButtonGroup">
|
||||
<div class="mx_ButtonRow">
|
||||
<a href="#/login" class="mx_ButtonParent mx_ButtonSignIn mx_Button_iconSignIn">
|
||||
<div class="mx_ButtonLabel">_t("Sign In")</div>
|
||||
</a>
|
||||
{% if matrix_client_schildichat_registration_enabled %}
|
||||
<a href="#/register" class="mx_ButtonParent mx_ButtonCreateAccount mx_Button_iconCreateAccount">
|
||||
<div class="mx_ButtonLabel">_t("Create Account")</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if matrix_client_schildichat_disable_guests != true %}
|
||||
<!-- The comments below are meant to be used by Ansible as a quick way
|
||||
to strip out the marked content when desired.
|
||||
See https://github.com/vector-im/riot-web/issues/8622.
|
||||
TODO: Convert to config option if possible. -->
|
||||
<!-- BEGIN Ansible: Remove these lines when guest access is disabled -->
|
||||
<div class="mx_ButtonRow mx_WelcomePage_guestFunctions">
|
||||
<div>
|
||||
<a href="#/directory" class="mx_ButtonParent mx_SecondaryButton mx_Button_iconRoomDirectory">
|
||||
<div class="mx_ButtonLabel">_t("Explore rooms")</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Ansible: Remove these lines when guest access is disabled -->
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user