35 Commits

Author SHA1 Message Date
ec22fb8497 meta: move inventory structure to be more usable 2025-04-08 21:10:16 +02:00
3690db8fe6 meta: add own inventory, add vault-unlock with GPG 2025-04-08 21:10:15 +02:00
81d6a2adca Update ghcr.io/element-hq/synapse Docker tag to v1.128.0 2025-04-08 19:33:31 +03:00
dd1170aa6d Update ghcr.io/element-hq/element-web Docker tag to v1.11.97 2025-04-08 19:33:23 +03:00
724e83efee Upgrade Jitsi (v10133-1-0 -> v10169-0) 2025-04-08 19:29:47 +03:00
5194fcd2aa Remove comments before locking threads
Necro-posting and notifying all subscribers for the purpose of preventing necro-posting is somewhat ironic
2025-04-08 11:45:06 +03:00
f7d2151607 Add lock-threads.yml
The action will be used to lock issues and PRs to prevent necro-posting on closed ones which have not had any activity in the past year.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-04-07 16:23:36 +03:00
5b7d8f4d42 Migrate config .github/renovate.json 2025-04-07 15:42:00 +03:00
3a414eda66 Upgrade ntfy (v2.11.0-4 -> v2.11.0-5) 2025-04-06 22:20:00 +03:00
42f7b9391e Upgrade LiveKit Server (v1.8.4-4 -> v1.8.4-5) and integrate with matrix_metrics_exposure_*, etc.
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4233

This doesn't make Prometheus automatically scrape metrics from LiveKit Server,
nor does it add a Grafana dashboard automatically, etc.

Still, it paves the way for that work being done.
2025-04-06 22:16:06 +03:00
a313b45583 updated etherpad (v2.2.7-4 -> v2.3.0-0); 2025-04-06 20:37:21 +03:00
678b1fc3e0 Add note about LiveKit Server's TURN being unable to work over IPv6 2025-04-06 18:56:06 +03:00
59ca77b792 Upgrade LiveKit Server (v1.8.4-3 -> v1.8.4-4) 2025-04-06 18:52:06 +03:00
5972f4c81a Auto-enable TURN support for LiveKit Server 2025-04-06 16:11:23 +03:00
b14b932af3 Upgrade LiveKit Server (v1.8.4-2 -> v1.8.4-3) 2025-04-06 16:09:51 +03:00
7fe25ef0fc Split matrix_coturn_systemd_required_services_list into _default, _auto and _custom 2025-04-06 15:36:51 +03:00
0aeb9a6b14 Fixed some documentation links 2025-04-05 09:45:29 +03:00
fac2d9c8ab Update ghcr.io/element-hq/lk-jwt-service Docker tag to v0.2.3 2025-04-04 23:05:23 +03:00
6f609944c7 Add missing stop/rm ExecStartPre tasks for matrix-mautrix-googlechat.service.j2 2025-04-04 13:16:00 +03:00
9ac8f1f531 Fixed ddclient dst path 2025-04-04 10:14:40 +03:00
f2f9472c4a Improved dynamic DNS 2025-04-04 10:14:40 +03:00
057bd168f4 Update ghcr.io/element-hq/lk-jwt-service Docker tag to v0.2.2 2025-04-02 21:32:06 +03:00
24c09745ee updated prometheus_node_exporter (v1.8.2-5 -> v1.9.1-0); 2025-04-02 11:47:06 +03:00
8a251a98e7 Update joseluisq/static-web-server Docker tag to v2.36.1 2025-04-02 08:23:25 +03:00
6036c4840b Update dependency traefik to v3.3.5-0 2025-04-01 17:25:45 +03:00
4158fda09e fix grafana var in group vars 2025-04-01 12:07:04 +03:00
4270a84ae1 Upgrade Grafana (v11.5.2-2 -> v11.6.0-0) 2025-04-01 11:01:20 +03:00
86dabd5521 Update ajbura/cinny Docker tag to v4.6.0 2025-03-31 18:39:59 +03:00
39c4ad4697 Upgrade baibot (v1.5.0 -> v1.5.1) 2025-03-31 15:10:08 +03:00
55e04609e3 Use default upstream healthcheck command for Element Web
Now that https://github.com/element-hq/element-web/pull/29471
is part of v1.11.96, we don't need to carry around this custom workaround.
2025-03-31 13:34:26 +03:00
2842276f54 Upgrade backup-borg (v1.4.0-1.9.13-0 -> v1.4.0-1.9.13-1) 2025-03-30 10:58:58 +03:00
e8c9a0e410 Randomize matrix-synapse-auto-compressor.timer start with a RandomizedDelaySec (defaults to 6h) 2025-03-29 10:34:37 +02:00
e1a2d427c6 Use multi-stage Dockerfile for building customized Synape
This also reverts e5574a405e because:
- it was causing issues on some servers (not clear why)
- such workarounds are no longer necessary when doing multi-stage building.
2025-03-29 08:01:27 +02:00
e5574a405e Install libldap-2.5 explicitly when installing synapse-s3-storage-provider to satisfy its psycopg2 dependency 2025-03-29 06:42:28 +02:00
64b3aeb1e0 Update ghcr.io/element-hq/element-call Docker tag to v0.9.0 2025-03-28 21:52:44 +02:00
26 changed files with 275 additions and 106 deletions

23
.github/renovate.json vendored
View File

@ -1,12 +1,17 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "extends": [
"config:base" "config:recommended"
], ],
"labels": ["dependencies"], "labels": [
"regexManagers": [ "dependencies"
],
"customManagers": [
{ {
"fileMatch": ["defaults/main.yml$"], "customType": "regex",
"fileMatch": [
"defaults/main.yml$"
],
"matchStrings": [ "matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?(?:_version|_tag)\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s" "# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?(?:_version|_tag)\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
] ]
@ -14,11 +19,11 @@
], ],
"packageRules": [ "packageRules": [
{ {
"matchSourceUrlPrefixes": [ "ignoreUnstable": false,
"https://github.com/devture/com.devture.ansible.role", "matchSourceUrls": [
"https://github.com/mother-of-all-self-hosting" "https://github.com/devture/com.devture.ansible.role{/,}**",
], "https://github.com/mother-of-all-self-hosting{/,}**"
"ignoreUnstable": false ]
} }
], ],
"ignoreDeps": [ "ignoreDeps": [

29
.github/workflows/lock-threads.yml vendored Normal file
View File

@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: 2017 - 2023 Armin Sebastian
#
# SPDX-License-Identifier: MIT
---
name: 'Lock Threads'
on: # yamllint disable-line rule:truthy
# Use this to do a dry run from a pull request
# pull_request:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock-threads
jobs:
action:
if: github.repository == 'spantaleev/matrix-docker-ansible-deploy'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
add-issue-labels: 'outdated'
process-only: 'issues, prs'

18
LICENSES/MIT.txt Normal file
View File

@ -0,0 +1,18 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -14,7 +14,7 @@ Most cloud providers / ISPs will charge you extra for a static IP address. If yo
## Prerequisite ## Prerequisite
You'll need to get a username and password from your DNS provider. Please consult with the provider about how to retrieve them. You'll need to authenticate with your DNS provider somehow, in most cases this is simply a username and password but can differ from provider to provider. Please consult with your providers documentation and the upstream [ddclient documentation](https://github.com/ddclient/ddclient/blob/main/ddclient.conf.in) to determine what you'll need to provide to authenticate.
## Adjusting the playbook configuration ## Adjusting the playbook configuration
@ -31,6 +31,8 @@ matrix_dynamic_dns_domain_configurations:
domain: "{{ matrix_domain }}" domain: "{{ matrix_domain }}"
``` ```
Keep in mind that certain providers may require a different configuration of the `matrix_dynamic_dns_domain_configurations` variable, for provider specific examples see the [upstream documentation](https://github.com/ddclient/ddclient/blob/main/ddclient.conf.in).
### Extending the configuration ### Extending the configuration
There are some additional things you may wish to configure about the component. There are some additional things you may wish to configure about the component.
@ -57,7 +59,8 @@ The shortcut commands with the [`just` program](just.md) are also available: `ju
Additional resources: Additional resources:
- https://matrix.org/docs/guides/free-small-matrix-server - https://matrix.org/docs/guides/free-small-matrix-server
- https://github.com/linuxserver/docker-ddclient
## Troubleshooting ## Troubleshooting
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-dynamic-dns`. As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-dynamic-dns`. However, due to an [upstream issue](https://github.com/linuxserver/docker-ddclient/issues/54#issuecomment-1153143132) the logging output is not always complete. For advanced debugging purposes running the `ddclient` tool outside of the container is useful via the following: `ddclient -file ./ddclient.conf -daemon=0 -debug -verbose -noquiet`.

View File

@ -25,4 +25,14 @@ To ensure LiveKit Server functions correctly, the following firewall rules and p
- `7882/udp`: ICE/UDP Mux - `7882/udp`: ICE/UDP Mux
- `3479/udp`: TURN/UDP. Also see the [Limitations](#limitations) section below.
- `5350/tcp`: TURN/TCP. Also see the [Limitations](#limitations) section below.
💡 The suggestions above are inspired by the upstream [Ports and Firewall](https://docs.livekit.io/home/self-hosting/ports-firewall/) documentation based on how LiveKit is configured in the playbook. If you've using custom configuration for the LiveKit Server role, you may need to adjust the firewall rules accordingly. 💡 The suggestions above are inspired by the upstream [Ports and Firewall](https://docs.livekit.io/home/self-hosting/ports-firewall/) documentation based on how LiveKit is configured in the playbook. If you've using custom configuration for the LiveKit Server role, you may need to adjust the firewall rules accordingly.
## Limitations
For some reason, LiveKit Server's TURN ports (`3479/udp` and `5350/tcp`) are not reachable over IPv6 regardless of whether you've [enabled IPv6](./configuring-ipv6.md) for your server.
It seems like LiveKit Server intentionally only listens on `udp4` and `tcp4` as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).

View File

@ -24,12 +24,15 @@ matrix_synapse_auto_compressor_enabled: true
### Edit the schedule (optional) ### Edit the schedule (optional)
By default the task will run 0 a.m. every day based on the `matrix_synapse_auto_compressor_schedule` variable. It is defined in the format of systemd timer calendar. By default the task will around 0 a.m. every day based on the `matrix_synapse_auto_compressor_schedule` variable with a randomized delay of 6 hours (controlled by the `matrix_synapse_auto_compressor_schedule_randomized_delay_sec` variable). It is defined in the format of systemd timer calendar.
To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs): To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs):
```yaml ```yaml
matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00" matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00"
# Consider adjusting the randomized delay or setting it to 0 to disable randomized delays.
# matrix_synapse_auto_compressor_schedule_randomized_delay_sec: 6h
``` ```
### Extending the configuration ### Extending the configuration

View File

@ -59,10 +59,10 @@ We will be using `example.com` as the domain in the following instruction. Pleas
- `80/tcp`: HTTP webserver - `80/tcp`: HTTP webserver
- `443/tcp` and `443/udp`: HTTPS webserver - `443/tcp` and `443/udp`: HTTPS webserver
- `3478/tcp`: STUN/TURN over TCP (used by [coturn](./docs/configuring-playbook-turn.md)) - `3478/tcp`: STUN/TURN over TCP (used by [coturn](./configuring-playbook-turn.md))
- `3478/udp`: STUN/TURN over TCP (used by [coturn](./docs/configuring-playbook-turn.md)) - `3478/udp`: STUN/TURN over TCP (used by [coturn](./configuring-playbook-turn.md))
- `5349/tcp`: TURN over TCP (used by [coturn](./docs/configuring-playbook-turn.md)) - `5349/tcp`: TURN over TCP (used by [coturn](./configuring-playbook-turn.md))
- `5349/udp`: TURN over UDP (used by [coturn](./docs/configuring-playbook-turn.md)) - `5349/udp`: TURN over UDP (used by [coturn](./configuring-playbook-turn.md))
- `8448/tcp` and `8448/udp`: Matrix Federation API HTTPS webserver. Some components like [Matrix User Verification Service](configuring-playbook-user-verification-service.md#open-matrix-federation-port) require this port to be opened **even with federation disabled**. - `8448/tcp` and `8448/udp`: Matrix Federation API HTTPS webserver. Some components like [Matrix User Verification Service](configuring-playbook-user-verification-service.md#open-matrix-federation-port) require this port to be opened **even with federation disabled**.
- the range `49152-49172/udp`: TURN over UDP - the range `49152-49172/udp`: TURN over UDP
- potentially some other ports, depending on the additional (non-default) services that you enable in the **configuring the playbook** step (later on). Consult each service's documentation page in `docs/` for that. - potentially some other ports, depending on the additional (non-default) services that you enable in the **configuring the playbook** step (later on). Consult each service's documentation page in `docs/` for that.

View File

@ -3568,10 +3568,8 @@ matrix_coturn_container_additional_volumes: |
) )
}} }}
matrix_coturn_systemd_required_services_list: | matrix_coturn_systemd_required_services_list_auto: |
{{ {{
[devture_systemd_docker_base_docker_service_name]
+
([traefik_certs_dumper_identifier + '-wait-for-domain@' + matrix_server_fqn_matrix + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and matrix_coturn_tls_enabled else []) ([traefik_certs_dumper_identifier + '-wait-for-domain@' + matrix_server_fqn_matrix + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and matrix_coturn_tls_enabled else [])
}} }}
@ -5599,7 +5597,7 @@ grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_prim
grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}" grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
grafana_provisioning_datasources: | grafana_provisioning_datasources_datasources: |
{{ {{
([{ ([{
'name': (matrix_server_fqn_matrix + ' - Prometheus'), 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
@ -6316,11 +6314,38 @@ livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm6
livekit_server_container_network: "{{ matrix_addons_container_network }}" livekit_server_container_network: "{{ matrix_addons_container_network }}"
livekit_server_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" livekit_server_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
livekit_server_container_additional_volumes_auto: |
{{
(
[
{
'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
'dst': livekit_server_config_turn_cert_file,
'options': 'ro',
},
{
'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
'dst': livekit_server_config_turn_key_file,
'options': 'ro',
},
] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled and (livekit_server_config_turn_cert_file and livekit_server_config_turn_key_file)) else []
)
}}
livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}" livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
livekit_server_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
livekit_server_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
livekit_server_metrics_proxying_enabled: "{{ livekit_server_config_prometheus_enabled and matrix_metrics_exposure_enabled }}"
livekit_server_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
livekit_server_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/livekit-server"
livekit_server_config_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
livekit_server_config_keys_auto: |- livekit_server_config_keys_auto: |-
{{ {{
{} {}
@ -6340,6 +6365,33 @@ livekit_server_config_turn_tls_port: 5350
# Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
livekit_server_config_turn_udp_port: 3479 livekit_server_config_turn_udp_port: 3479
# LiveKit's TURN implementation requires SSL certificates.
# We only enable it if we can provide them automatically via Traefik + Traefik Certs Dumper.
livekit_server_config_turn_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled }}"
livekit_server_config_turn_cert_file: |-
{{
{
'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
livekit_server_config_turn_key_file: |-
{{
{
'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
livekit_server_systemd_required_services_list_auto: |
{{
([traefik_certs_dumper_identifier + '-wait-for-domain@' + livekit_server_config_turn_domain + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled else [])
}}
######################################################################## ########################################################################
# # # #
# /livekit-server # # /livekit-server #

View File

@ -4,7 +4,7 @@
version: v1.0.0-5 version: v1.0.0-5
name: auxiliary name: auxiliary
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-backup_borg.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-backup_borg.git
version: v1.4.0-1.9.13-0 version: v1.4.0-1.9.13-1
name: backup_borg name: backup_borg
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-container-socket-proxy.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-container-socket-proxy.git
version: v0.3.0-4 version: v0.3.0-4
@ -16,22 +16,22 @@
version: 129c8590e106b83e6f4c259649a613c6279e937a version: 129c8590e106b83e6f4c259649a613c6279e937a
name: docker_sdk_for_python name: docker_sdk_for_python
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-etherpad.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-etherpad.git
version: v2.2.7-4 version: v2.3.0-0
name: etherpad name: etherpad
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay.git
version: v4.98.1-r0-2-0 version: v4.98.1-r0-2-0
name: exim_relay name: exim_relay
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-grafana.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-grafana.git
version: v11.5.2-2 version: v11.6.0-0
name: grafana name: grafana
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git
version: v10133-1-0 version: v10169-0
name: jitsi name: jitsi
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server.git
version: v1.8.4-2 version: v1.8.4-5
name: livekit_server name: livekit_server
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git
version: v2.11.0-4 version: v2.11.0-5
name: ntfy name: ntfy
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git - src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git
version: 201c939eed363de269a83ba29784fc3244846048 version: 201c939eed363de269a83ba29784fc3244846048
@ -52,7 +52,7 @@
version: v2.55.1-3 version: v2.55.1-3
name: prometheus name: prometheus
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-node-exporter.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-node-exporter.git
version: v1.8.2-5 version: v1.9.1-0
name: prometheus_node_exporter name: prometheus_node_exporter
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-postgres-exporter.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-postgres-exporter.git
version: v0.14.0-9 version: v0.14.0-9
@ -67,7 +67,7 @@
version: v1.0.0-0 version: v1.0.0-0
name: timesync name: timesync
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik.git
version: v3.3.4-1 version: v3.3.5-0
name: traefik name: traefik
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik-certs-dumper.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik-certs-dumper.git
version: v2.10.0-0 version: v2.10.0-0

View File

@ -17,7 +17,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src" matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot # renovate: datasource=docker depName=ghcr.io/etkecc/baibot
matrix_bot_baibot_version: v1.5.0 matrix_bot_baibot_version: v1.5.1
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}" matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}" matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}" matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"

View File

@ -13,6 +13,8 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" 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 }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-mautrix-googlechat 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-googlechat 2>/dev/null || true'
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--rm \ --rm \

View File

@ -18,7 +18,7 @@ matrix_cactus_comments_client_public_path: "{{ matrix_cactus_comments_client_bas
matrix_cactus_comments_client_public_path_file_permissions: "0644" matrix_cactus_comments_client_public_path_file_permissions: "0644"
# renovate: datasource=docker depName=joseluisq/static-web-server # renovate: datasource=docker depName=joseluisq/static-web-server
matrix_cactus_comments_client_version: 2.36.0 matrix_cactus_comments_client_version: 2.36.1
matrix_cactus_comments_client_container_image: "{{ matrix_cactus_comments_client_container_image_registry_prefix }}joseluisq/static-web-server:{{ matrix_cactus_comments_client_container_image_tag }}" matrix_cactus_comments_client_container_image: "{{ matrix_cactus_comments_client_container_image_registry_prefix }}joseluisq/static-web-server:{{ matrix_cactus_comments_client_container_image_tag }}"
matrix_cactus_comments_client_container_image_registry_prefix: "{{ matrix_cactus_comments_client_container_image_registry_prefix_upstream }}" matrix_cactus_comments_client_container_image_registry_prefix: "{{ matrix_cactus_comments_client_container_image_registry_prefix_upstream }}"

View File

@ -17,7 +17,7 @@ matrix_client_cinny_container_image_self_build: false
matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git" matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git"
# renovate: datasource=docker depName=ajbura/cinny # renovate: datasource=docker depName=ajbura/cinny
matrix_client_cinny_version: v4.5.1 matrix_client_cinny_version: v4.6.0
matrix_client_cinny_docker_image: "{{ matrix_client_cinny_docker_image_registry_prefix }}ajbura/cinny:{{ matrix_client_cinny_version }}" matrix_client_cinny_docker_image: "{{ matrix_client_cinny_docker_image_registry_prefix }}ajbura/cinny:{{ matrix_client_cinny_version }}"
matrix_client_cinny_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_cinny_container_image_self_build else matrix_client_cinny_docker_image_registry_prefix_upstream }}" matrix_client_cinny_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_cinny_container_image_self_build else matrix_client_cinny_docker_image_registry_prefix_upstream }}"
matrix_client_cinny_docker_image_registry_prefix_upstream: "{{ matrix_client_cinny_docker_image_registry_prefix_upstream_default }}" matrix_client_cinny_docker_image_registry_prefix_upstream: "{{ matrix_client_cinny_docker_image_registry_prefix_upstream_default }}"

View File

@ -29,7 +29,7 @@ matrix_client_element_container_image_self_build_repo: "https://github.com/eleme
matrix_client_element_container_image_self_build_low_memory_system_patch_enabled: "{{ ansible_memtotal_mb < 4096 }}" matrix_client_element_container_image_self_build_low_memory_system_patch_enabled: "{{ ansible_memtotal_mb < 4096 }}"
# renovate: datasource=docker depName=ghcr.io/element-hq/element-web # renovate: datasource=docker depName=ghcr.io/element-hq/element-web
matrix_client_element_version: v1.11.96 matrix_client_element_version: v1.11.97
matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_registry_prefix }}element-hq/element-web:{{ matrix_client_element_version }}" matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_registry_prefix }}element-hq/element-web:{{ matrix_client_element_version }}"
matrix_client_element_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else matrix_client_element_docker_image_registry_prefix_upstream }}" matrix_client_element_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else matrix_client_element_docker_image_registry_prefix_upstream }}"
@ -113,10 +113,7 @@ matrix_client_element_systemd_required_services_list: "{{ [devture_systemd_docke
# Controls the healthcheck command for the container. # Controls the healthcheck command for the container.
# #
# Leave empty to use the default (upstream) command. # Leave empty to use the default (upstream) command.
# matrix_client_element_container_healthcheck_cmd: ""
# The default command is a patch until https://github.com/element-hq/element-web/pull/29471
# lands in a release.
matrix_client_element_container_healthcheck_cmd: "wget -q --spider http://localhost:$ELEMENT_WEB_PORT/config.json"
# Specifies the value of the `X-XSS-Protection` header # Specifies the value of the `X-XSS-Protection` header
# Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.

View File

@ -56,7 +56,10 @@ matrix_coturn_docker_src_files_path: "{{ matrix_coturn_base_path }}/docker-src"
matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf" matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf"
# List of systemd services that matrix-coturn.service depends on # List of systemd services that matrix-coturn.service depends on
matrix_coturn_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_coturn_systemd_required_services_list: "{{ matrix_coturn_systemd_required_services_list_default + matrix_coturn_systemd_required_services_list_auto + matrix_coturn_systemd_required_services_list_custom }}"
matrix_coturn_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
matrix_coturn_systemd_required_services_list_auto: []
matrix_coturn_systemd_required_services_list_custom: []
# A list of additional "volumes" to mount in the container. # A list of additional "volumes" to mount in the container.
# This list gets populated dynamically at runtime. You can provide a different default value, # This list gets populated dynamically at runtime. You can provide a different default value,

View File

@ -55,6 +55,18 @@ matrix_dynamic_dns_base_path: "{{ matrix_base_data_path }}/dynamic-dns"
matrix_dynamic_dns_config_path: "{{ matrix_dynamic_dns_base_path }}/config" matrix_dynamic_dns_config_path: "{{ matrix_dynamic_dns_base_path }}/config"
matrix_dynamic_dns_docker_src_files_path: "{{ matrix_dynamic_dns_base_path }}/docker-src" matrix_dynamic_dns_docker_src_files_path: "{{ matrix_dynamic_dns_base_path }}/docker-src"
# Config options
matrix_dynamic_dns_use: "web"
# The endpoint to use to determine your external IP
matrix_dynamic_dns_web: "https://cloudflare.com/cdn-cgi/trace"
# The field to extract the IP from
# If your endpoint defined in `matrix_dynamic_dns_web` doesn't need this, just set it to ""
matrix_dynamic_dns_web_skip: "ip="
matrix_dynamic_dns_additional_configuration_blocks: []
# Holds the configurations (the domains to update DNS for, the providers they use, etc.) # Holds the configurations (the domains to update DNS for, the providers they use, etc.)
# #
# Example: # Example:
@ -65,7 +77,3 @@ matrix_dynamic_dns_docker_src_files_path: "{{ matrix_dynamic_dns_base_path }}/do
# password: XXXXXXXXXXXXXXXX # password: XXXXXXXXXXXXXXXX
# domain: "{{ matrix_domain }}" # domain: "{{ matrix_domain }}"
matrix_dynamic_dns_domain_configurations: [] matrix_dynamic_dns_domain_configurations: []
# Config options
matrix_dynamic_dns_additional_configuration_blocks: []
matrix_dynamic_dns_use: "web"

View File

@ -14,8 +14,8 @@
- name: Fail if required matrix-dynamic-dns settings not defined in configuration blocks - name: Fail if required matrix-dynamic-dns settings not defined in configuration blocks
ansible.builtin.fail: ansible.builtin.fail:
msg: >- msg: >-
One of the configurations in matrix_dynamic_dns_domain_configurations is missing a required key (domain, provider, protocol). One of the configurations in matrix_dynamic_dns_domain_configurations is missing a required key (domain, protocol).
when: "'domain' not in configuration or 'provider' not in configuration or 'protocol' not in configuration" when: "'domain' not in configuration or 'protocol' not in configuration"
with_items: "{{ matrix_dynamic_dns_domain_configurations }}" with_items: "{{ matrix_dynamic_dns_domain_configurations }}"
loop_control: loop_control:
loop_var: configuration loop_var: configuration

View File

@ -10,24 +10,57 @@ syslog=no
pid=/var/run/ddclient/ddclient.pid pid=/var/run/ddclient/ddclient.pid
ssl=yes ssl=yes
use={{ matrix_dynamic_dns_use }} use={{ matrix_dynamic_dns_use }}
web='{{ matrix_dynamic_dns_web }}'
{% for dynamic_dns_domain_configuration in matrix_dynamic_dns_domain_configurations %} {% if matrix_dynamic_dns_web_skip %}
protocol={{ dynamic_dns_domain_configuration.protocol }} web-skip='{{ matrix_dynamic_dns_web_skip }}'
server={{ dynamic_dns_domain_configuration.provider }} {% if 'username' in dynamic_dns_domain_configuration %} {% endif %}
login='{{ dynamic_dns_domain_configuration.username }}' {% endif %} {% if 'password' in dynamic_dns_domain_configuration %}
password='{{ dynamic_dns_domain_configuration.password }}' {% endif %} {% if 'static' in dynamic_dns_domain_configuration %}
static=yes {% endif %} {% if 'custom' in dynamic_dns_domain_configuration %}
custom=yes {% endif %} {% if 'zone' in dynamic_dns_domain_configuration %}
zone={{ dynamic_dns_domain_configuration.zone }} {% endif %} {% if 'ttl' in dynamic_dns_domain_configuration %}
ttl={{ dynamic_dns_domain_configuration.ttl }} {% endif %} {% if 'mx' in dynamic_dns_domain_configuration %}
mx={{ dynamic_dns_domain_configuration.mx }} {% endif %} {% if 'wildcard' in dynamic_dns_domain_configuration %}
wildcard=yes {% endif %}
{{ dynamic_dns_domain_configuration.domain }}
{% endfor %}
{% for matrix_dynamic_dns_additional_configuration in matrix_dynamic_dns_additional_configuration_blocks %} {% for matrix_dynamic_dns_additional_configuration in matrix_dynamic_dns_additional_configuration_blocks %}
{{ matrix_dynamic_dns_additional_configuration }} {{ matrix_dynamic_dns_additional_configuration }}
{% endfor %}
{% for dynamic_dns_domain_configuration in matrix_dynamic_dns_domain_configurations %}
protocol={{ dynamic_dns_domain_configuration.protocol }}
{% if 'provider' in dynamic_dns_domain_configuration %}
server={{ dynamic_dns_domain_configuration.provider }}
{% endif %}
{% if 'username' in dynamic_dns_domain_configuration %}
login='{{ dynamic_dns_domain_configuration.username }}'
{% endif %}
{% if 'password' in dynamic_dns_domain_configuration %}
password='{{ dynamic_dns_domain_configuration.password }}'
{% endif %}
{% if 'static' in dynamic_dns_domain_configuration %}
static=yes
{% endif %}
{% if 'custom' in dynamic_dns_domain_configuration %}
custom=yes
{% endif %}
{% if 'zone' in dynamic_dns_domain_configuration %}
zone={{ dynamic_dns_domain_configuration.zone }}
{% endif %}
{% if 'ttl' in dynamic_dns_domain_configuration %}
ttl={{ dynamic_dns_domain_configuration.ttl }}
{% endif %}
{% if 'mx' in dynamic_dns_domain_configuration %}
mx={{ dynamic_dns_domain_configuration.mx }}
{% endif %}
{% if 'wildcard' in dynamic_dns_domain_configuration %}
wildcard=yes
{% endif %}
{% if 'script' in dynamic_dns_domain_configuration %}
script={{ dynamic_dns_domain_configuration.script }}
{% endif %}
{{ dynamic_dns_domain_configuration.domain }}
{% endfor %} {% endfor %}

View File

@ -23,7 +23,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--network={{ matrix_dynamic_dns_container_network }} \ --network={{ matrix_dynamic_dns_container_network }} \
-e PUID={{ matrix_user_uid }} \ -e PUID={{ matrix_user_uid }} \
-e PGID={{ matrix_user_gid }} \ -e PGID={{ matrix_user_gid }} \
--mount type=bind,src={{ matrix_dynamic_dns_config_path }},dst=/config/ddclient \ --mount type=bind,src={{ matrix_dynamic_dns_config_path }},dst=/config \
{% for arg in matrix_dynamic_dns_container_extra_arguments %} {% for arg in matrix_dynamic_dns_container_extra_arguments %}
{{ arg }} \ {{ arg }} \
{% endfor %} {% endfor %}

View File

@ -12,7 +12,7 @@
matrix_element_call_enabled: false matrix_element_call_enabled: false
# renovate: datasource=docker depName=ghcr.io/element-hq/element-call # renovate: datasource=docker depName=ghcr.io/element-hq/element-call
matrix_element_call_version: v0.8.0 matrix_element_call_version: v0.9.0
matrix_element_call_scheme: https matrix_element_call_scheme: https

View File

@ -25,7 +25,7 @@ matrix_livekit_jwt_service_container_additional_networks_auto: []
matrix_livekit_jwt_service_container_additional_networks_custom: [] matrix_livekit_jwt_service_container_additional_networks_custom: []
# renovate: datasource=docker depName=ghcr.io/element-hq/lk-jwt-service # renovate: datasource=docker depName=ghcr.io/element-hq/lk-jwt-service
matrix_livekit_jwt_service_version: 0.2.1 matrix_livekit_jwt_service_version: 0.2.3
matrix_livekit_jwt_service_container_image_self_build: false matrix_livekit_jwt_service_container_image_self_build: false
matrix_livekit_jwt_service_container_repo: "https://github.com/element-hq/lk-jwt-service.git" matrix_livekit_jwt_service_container_repo: "https://github.com/element-hq/lk-jwt-service.git"

View File

@ -13,7 +13,7 @@ matrix_static_files_enabled: true
matrix_static_files_identifier: matrix-static-files matrix_static_files_identifier: matrix-static-files
# renovate: datasource=docker depName=joseluisq/static-web-server # renovate: datasource=docker depName=joseluisq/static-web-server
matrix_static_files_version: 2.36.0 matrix_static_files_version: 2.36.1
matrix_static_files_base_path: "{{ matrix_base_data_path }}/{{ 'static-files' if matrix_static_files_identifier == 'matrix-static-files' else matrix_static_files_identifier }}" matrix_static_files_base_path: "{{ matrix_base_data_path }}/{{ 'static-files' if matrix_static_files_identifier == 'matrix-static-files' else matrix_static_files_identifier }}"
matrix_static_files_config_path: "{{ matrix_static_files_base_path }}/config" matrix_static_files_config_path: "{{ matrix_static_files_base_path }}/config"

View File

@ -64,9 +64,14 @@ matrix_synapse_auto_compressor_database_name: 'synapse'
# connection string to synapse database (postgres only) # connection string to synapse database (postgres only)
matrix_synapse_auto_compressor_synapse_database: 'postgres://{{ matrix_synapse_auto_compressor_database_username | urlencode() }}:{{ matrix_synapse_auto_compressor_database_password | urlencode() }}@{{ matrix_synapse_auto_compressor_database_hostname }}:{{ matrix_synapse_auto_compressor_database_port }}/{{ matrix_synapse_auto_compressor_database_name }}' matrix_synapse_auto_compressor_synapse_database: 'postgres://{{ matrix_synapse_auto_compressor_database_username | urlencode() }}:{{ matrix_synapse_auto_compressor_database_password | urlencode() }}@{{ matrix_synapse_auto_compressor_database_hostname }}:{{ matrix_synapse_auto_compressor_database_port }}/{{ matrix_synapse_auto_compressor_database_name }}'
# systemd calendar configuration for the compressor job # Controls the `OnCalendar` configuration for the compressor job.
# Also see: `matrix_synapse_auto_compressor_schedule_randomized_delay_sec`
matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00" matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00"
# The `RandomizedDelaySec` delay (in seconds or as a systemd time string) to randomize the `OnCalendar` start time (`matrix_synapse_auto_compressor_schedule`) of the compressor job.
# This can be set to 0 to disable randomized delays.
matrix_synapse_auto_compressor_schedule_randomized_delay_sec: 6h
# The number of state groups to work on at once. # The number of state groups to work on at once.
# All of the entries from state_groups_state are requested from the database for state groups that are worked on. # All of the entries from state_groups_state are requested from the database for state groups that are worked on.
# Therefore small chunk sizes may be needed on machines with low memory. # Therefore small chunk sizes may be needed on machines with low memory.

View File

@ -11,6 +11,7 @@ Description=Synapse State Auto Compressor Timer
[Timer] [Timer]
Unit=matrix-synapse-auto-compressor.service Unit=matrix-synapse-auto-compressor.service
OnCalendar={{ matrix_synapse_auto_compressor_schedule }} OnCalendar={{ matrix_synapse_auto_compressor_schedule }}
RandomizedDelaySec={{ matrix_synapse_auto_compressor_schedule_randomized_delay_sec }}
[Install] [Install]
WantedBy=timers.target WantedBy=timers.target

View File

@ -16,7 +16,7 @@ matrix_synapse_enabled: true
matrix_synapse_github_org_and_repo: element-hq/synapse matrix_synapse_github_org_and_repo: element-hq/synapse
# renovate: datasource=docker depName=ghcr.io/element-hq/synapse # renovate: datasource=docker depName=ghcr.io/element-hq/synapse
matrix_synapse_version: v1.127.1 matrix_synapse_version: v1.128.0
matrix_synapse_username: '' matrix_synapse_username: ''
matrix_synapse_uid: '' matrix_synapse_uid: ''

View File

@ -1,4 +1,43 @@
#jinja2: lstrip_blocks: "True" #jinja2: lstrip_blocks: "True"
{% if matrix_synapse_container_image_customizations_templates_enabled %}
FROM {{ matrix_synapse_docker_image }} AS templates-builder
{#
This ugly script below does quite a lot:
- installs git and other dependencies temporarily, just so we could do a shallow-clone
- prepare the SSH config: keyscanning (if enabled), private key (if enabled)
- performs a git shallow clone with just the branch we need
- makes sure the files are owned by the user that will actually run the container later
#}
{% set dependencies = ['git', 'ssh', 'openssh-client'] %}
{% if matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key %}
RUN echo '{{ matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key | b64encode }}' | base64 -d > /custom-templates-private-key
RUN chmod 400 /custom-templates-private-key
{% endif %}
RUN apt-get update && apt-get install --no-install-recommends -y {{ dependencies | join(' ') }}
{% if matrix_synapse_container_image_customizations_templates_git_repository_keyscan_enabled %}
RUN mkdir ~/.ssh
RUN chmod 700 ~/.ssh
RUN ssh-keyscan -t rsa {{ matrix_synapse_container_image_customizations_templates_git_repository_keyscan_hostname }} >> ~/.ssh/known_hosts
{% endif %}
RUN {% if matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key %}GIT_SSH_COMMAND='ssh -i /custom-templates-private-key'{% endif %} git \
clone \
--branch={{ matrix_synapse_container_image_customizations_templates_git_repository_branch }} \
--depth=1 \
--single-branch \
--no-tags \
{{ matrix_synapse_container_image_customizations_templates_git_repository_url }} \
{{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}
RUN /bin/sh -c 'cd {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }} && git rev-parse HEAD > git-revision.txt'
RUN rm -rf {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}/.git
RUN chown -R {{ matrix_synapse_uid }}:{{ matrix_synapse_gid }} {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}
{% endif %}
FROM {{ matrix_synapse_docker_image }} FROM {{ matrix_synapse_docker_image }}
{% if matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled %} {% if matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled %}
@ -14,46 +53,7 @@ RUN pip install synapse-s3-storage-provider=={{ matrix_synapse_ext_synapse_s3_st
{% endif %} {% endif %}
{% if matrix_synapse_container_image_customizations_templates_enabled %} {% if matrix_synapse_container_image_customizations_templates_enabled %}
{# COPY --from=templates-builder {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }} {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}
This ugly script below does quite a lot:
- installs git and other dependencies temporarily, just so we could do a shallow-clone
- prepare the SSH config: keyscanning (if enabled), private key (if enabled)
- performs a git shallow clone with just the branch we need
- makes sure the files are owned by the user that will actually run the container later
- removes the `.git` directory to save space, but keeps git revision in `git-revision.txt`, should we need it for debugging
- finally, verifies that the templates path can indeed be found within the base path (sanity check)
#}
{% set dependencies = ['git', 'ssh', 'openssh-client'] %}
RUN \
{% if matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key %}
echo '{{ matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key | b64encode }}' | base64 -d > /custom-templates-private-key && \
chmod 400 /custom-templates-private-key && \
{% endif %}
apt-get update && \
apt-get install --no-install-recommends -y {{ dependencies | join(' ') }} && \
{% if matrix_synapse_container_image_customizations_templates_git_repository_keyscan_enabled %}
mkdir ~/.ssh && \
chmod 700 ~/.ssh && \
ssh-keyscan -t rsa {{ matrix_synapse_container_image_customizations_templates_git_repository_keyscan_hostname }} >> ~/.ssh/known_hosts && \
{% endif %}
{% if matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key %}GIT_SSH_COMMAND='ssh -i /custom-templates-private-key'{% endif %} git \
clone \
--branch={{ matrix_synapse_container_image_customizations_templates_git_repository_branch }} \
--depth=1 \
--single-branch \
--no-tags \
{{ matrix_synapse_container_image_customizations_templates_git_repository_url }} \
{{ matrix_synapse_container_image_customizations_templates_in_container_base_path }} && \
/bin/sh -c 'cd {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }} && git rev-parse HEAD > git-revision.txt' && \
rm -rf {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}/.git && \
chown -R {{ matrix_synapse_uid }}:{{ matrix_synapse_gid }} {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }} && \
apt-get autoremove -y {{ dependencies | join(' ') }} && \
{% if matrix_synapse_container_image_customizations_templates_git_repository_ssh_private_key %}
rm /custom-templates-private-key && \
{% endif %}
true
RUN /bin/sh -c 'stat {{ matrix_synapse_container_image_customizations_templates_in_container_base_path }}/{{ matrix_synapse_container_image_customizations_templates_in_container_template_files_relative_path }} || exit 1'
{% endif %} {% endif %}
{{ matrix_synapse_container_image_customizations_dockerfile_body_custom }} {{ matrix_synapse_container_image_customizations_dockerfile_body_custom }}