Update 2 files

- /roles/matrix/templates/docker-compose.yml.j2
- /roles/matrix/files/homeserver.yaml
This commit is contained in:
Administrator 2025-10-23 13:51:01 +00:00
parent fb03ecce61
commit 44c41311ba
2 changed files with 81 additions and 49 deletions

View File

@ -0,0 +1,49 @@
server_name: "{{ matrix_server_name }}"
pid_file: /data/homeserver.pid
public_baseurl: "https://{{ matrix_domain }}/"
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation]
compress: false
database:
name: psycopg2
args:
user: synapse
password: "{{ vault_matrix_postgres_password }}"
database: synapse
host: matrix-postgres
cp_min: 5
cp_max: 10
log_config: "/data/log.config"
media_store_path: /data/media_store
uploads_path: /data/uploads
enable_registration: {{ matrix_registration_enabled | bool | lower }}
enable_registration_without_verification: false
registration_shared_secret: "{{ vault_matrix_synapse_secret }}"
macaroon_secret_key: "{{ vault_matrix_macaroon_secret }}"
form_secret: "{{ vault_matrix_form_secret }}"
report_stats: {{ matrix_report_stats | bool | lower }}
retention:
enabled: true
default_policy:
min_lifetime: 1d
max_lifetime: 30d
url_preview_enabled: true
url_preview_ip_range_blacklist:
- '127.0.0.0/8'
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '100.64.0.0/10'
- '169.254.0.0/16'
- '::1/128'
- 'fe80::/64'
- 'fc00::/7'
max_upload_size: "50M"
# Federation
federation_domain_whitelist: ~
allow_public_rooms_over_federation: true

View File

@ -1,49 +1,32 @@
server_name: "{{ matrix_server_name }}" version: '3.8'
pid_file: /data/homeserver.pid services:
public_baseurl: "https://{{ matrix_domain }}/" matrix-postgres:
listeners: image: postgres:15
- port: 8008 restart: unless-stopped
tls: false environment:
type: http POSTGRES_USER: {{ matrix_postgres_user }}
x_forwarded: true POSTGRES_PASSWORD: "{{ vault_matrix_postgres_password }}"
resources: POSTGRES_DB: {{ matrix_postgres_db }}
- names: [client, federation] volumes:
compress: false - {{ matrix_postgres_dir }}:/var/lib/postgresql/data
database: networks:
name: psycopg2 - matrix
args:
user: synapse matrix-synapse:
password: "{{ vault_matrix_postgres_password }}" image: matrixdotorg/synapse:latest
database: synapse restart: unless-stopped
host: matrix-postgres depends_on:
cp_min: 5 - matrix-postgres
cp_max: 10 environment:
log_config: "/data/log.config" - SYNAPSE_SERVER_NAME={{ matrix_server_name }}
media_store_path: /data/media_store - SYNAPSE_REPORT_STATS={{ matrix_report_stats | bool | lower }}
uploads_path: /data/uploads volumes:
enable_registration: {{ matrix_registration_enabled | bool | lower }} - {{ matrix_config_dir }}:/data
enable_registration_without_verification: false ports:
registration_shared_secret: "{{ vault_matrix_synapse_secret }}" - "{{ matrix_port }}:8008"
macaroon_secret_key: "{{ vault_matrix_macaroon_secret }}" networks:
form_secret: "{{ vault_matrix_form_secret }}" - matrix
report_stats: {{ matrix_report_stats | bool | lower }}
retention: networks:
enabled: true matrix:
default_policy: driver: bridge
min_lifetime: 1d
max_lifetime: 30d
url_preview_enabled: true
url_preview_ip_range_blacklist:
- '127.0.0.0/8'
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '100.64.0.0/10'
- '169.254.0.0/16'
- '::1/128'
- 'fe80::/64'
- 'fc00::/7'
max_upload_size: "50M"
# Federation
federation_domain_whitelist: ~
allow_public_rooms_over_federation: true