65 lines
2.6 KiB
YAML
65 lines
2.6 KiB
YAML
---
|
|
synapse_container_name: synapse
|
|
synapse_container_image: >-2
|
|
{{
|
|
[
|
|
synapse_container_image_repository,
|
|
synapse_container_image_tag | default('v' ~ synapse_version, true)
|
|
] | join(':')
|
|
}}
|
|
synapse_container_image_registry: ghcr.io
|
|
synapse_container_image_namespace: element-hq
|
|
synapse_container_image_name: synapse
|
|
synapse_container_image_repository: >-2
|
|
{{ synapse_container_image_registry
|
|
~ (('/' ~ synapse_container_image_namespace)
|
|
if synapse_container_image_namespace else '')
|
|
~ '/' ~ synapse_container_image_name }}
|
|
synapse_container_image_source: pull
|
|
synapse_container_image_tag: ~
|
|
synapse_container_env: {}
|
|
synapse_container_user: >-2
|
|
{{ ((synapse_user_info is defined) and ('uid' in synapse_user_info))
|
|
| ternary(synapse_user_info.uid, synapse_user) }}
|
|
synapse_container_group: >-2
|
|
{{ ((synapse_user_info is defined) and ('group' in synapse_user_info))
|
|
| ternary(synapse_user_info.group, synapse_user) }}
|
|
synapse_container_groups:
|
|
- "{{ synapse_container_group }}"
|
|
synapse_container_ports: ~
|
|
synapse_container_labels: ~
|
|
synapse_container_ulimits: ~
|
|
synapse_container_networks: ~
|
|
synapse_container_dns_servers: ~
|
|
synapse_container_etc_hosts: ~
|
|
synapse_container_memory: ~
|
|
synapse_container_memory_reservation: ~
|
|
synapse_container_memory_swap: ~
|
|
synapse_container_state: >-2
|
|
{{ (synapse_state == 'present')
|
|
| ternary('started', 'absent') }}
|
|
synapse_container_restart_policy: >-2
|
|
{{ (synapse_deployment_method == 'docker')
|
|
| ternary('unless-stopped', ((synapse_deployment_method == 'podman')
|
|
| ternary('on-failure', 'always')))
|
|
}}
|
|
|
|
synapse_container_volumes: ~
|
|
synapse_container_default_volumes:
|
|
- "{{ synapse_homeserver_config_file }}:/data/homeserver.yaml:ro"
|
|
- "{{ synapse_logging_config_file }}:{{ synapse_logging_config_file }}:ro"
|
|
- "{{ synapse_signing_key_file }}:{{ synapse_signing_key_file }}:ro"
|
|
- "{{ synapse_data_path }}:{{ synapse_data_path }}:z"
|
|
- "{{ synapse_media_store_path }}:{{ synapse_media_store_path }}:z"
|
|
- "{{ synapse_log_path }}:{{ synapse_log_path }}:z"
|
|
synapse_container_tls_volumes:
|
|
- "{{ synapse_config_tls_certificate_path }}:{{ synapse_config_tls_certificate_path }}:ro"
|
|
- "{{ synapse_config_tls_private_key_path }}:{{ synapse_config_tls_private_key_path_path }}:ro"
|
|
synapse_container_all_volumes: >-
|
|
{{ synapse_container_default_volumes | default([], true)
|
|
+ (synapse_container_tls_volumes
|
|
if (synapse_config_tls_private_key_path | default(false, true) | bool
|
|
and synapse_config_tls_certificate_path | default(false, true) | bool)
|
|
else [])
|
|
+ synapse_container_volumes | default([], true) }}
|