matrix/variables.yml

169 lines
4.7 KiB
YAML
Raw Permalink Normal View History

2023-12-16 00:32:03 +01:00
---
2023-12-21 12:31:40 +01:00
# Name of the instance
2023-12-16 00:32:03 +01:00
instance: matrix
matrix:
2023-12-21 12:31:40 +01:00
# Server name will determine your Matrix ID (@user:server_name), it cannot be changed later
2023-12-16 00:32:03 +01:00
server_name: matrix.[[ .consul.domain ]]
2023-12-21 12:31:40 +01:00
# The public URL where user should go to reach the web interface
2023-12-16 00:32:03 +01:00
public_url: https://matrix.[[ .consul.domain ]]
2023-12-21 12:31:40 +01:00
# Are guests allowed
allow_guests: false
2023-12-16 00:32:03 +01:00
2023-12-21 12:31:40 +01:00
# Consul settings, to connect to the postgres service
2023-12-16 00:32:03 +01:00
consul:
connect:
upstreams:
- destination_name: postgres[[ .consul.suffix ]]
local_bind_port: 5432
# Synpase settings
2023-12-16 00:32:03 +01:00
synapse:
# Version of synapse
2024-05-14 22:37:50 +02:00
version: 1.107.0
2023-12-21 12:31:40 +01:00
# The docker image to use
image: '[[ .docker.repo ]]matrix-synapse:[[ .matrix.synapse.version ]]-1'
2023-12-16 00:32:03 +01:00
2023-12-21 12:31:40 +01:00
# Additional env var to set in the container
2024-01-31 14:50:08 +01:00
env: {}
2023-12-16 00:32:03 +01:00
2023-12-21 12:31:40 +01:00
# You can define a custom yaml config which will be merged over the default one.
# Eg, to setup OIDC auth
# config:
# oidc_providers:
# - idp_id: oidc
# idp_name: ACME
# issuer: https://sso.example.org
# client_id: matrix
# client_secret: '{{ with secret "kv/service/matrix" }}{{ .Data.data.oidc_secret }}{{ end }}'
# scope:
# - openid
# - email
# - profile
# user_mapping_provider:
# config:
# display_name_template: '{{"{{"}} user.name {{"}}"}}'
# email_template: '{{"{{"}} user.email {{"}}"}}'
2023-12-16 00:32:03 +01:00
config: {}
2023-12-21 12:31:40 +01:00
# URL preview settings
url_preview:
enabled: true
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
- 192.0.0.0/24
- 169.254.0.0/16
- 192.88.99.0/24
- 198.18.0.0/15
- 192.0.2.0/24
- 198.51.100.0/24
- 203.0.113.0/24
- 224.0.0.0/4
url_blacklist:
- username: '*'
- netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
2023-12-16 00:32:03 +01:00
2024-01-11 23:21:01 +01:00
vault:
2024-01-31 14:50:08 +01:00
# Vault policies
2024-01-11 23:21:01 +01:00
policies:
- '[[ .instance ]]-synapse[[ .consul.suffix ]]'
2024-01-31 14:50:08 +01:00
# Random secrets to generate and store in vault KV
rand_secrets:
fields:
- macaroon_secret_key
- form_secret
database:
role: '[[ .instance ]]-synapse'
pgrole: '[[ .instance ]]-synapse'
2024-01-11 23:21:01 +01:00
2023-12-21 12:31:40 +01:00
# Postgres database to use
2024-01-11 23:21:01 +01:00
postgres:
2023-12-16 00:32:03 +01:00
host: 127.0.0.1
port: 5432
2024-01-11 23:21:01 +01:00
database: '[[ .instance ]]-synapse'
user: '{{ with secret "[[ .vault.root ]]database/creds/[[ .instance ]]-synapse" }}{{ .Data.username }}{{ end }}'
password: '{{ with secret "[[ .vault.root ]]database/creds/[[ .instance ]]-synapse" }}{{ .Data.password }}{{ end }}'
2023-12-16 00:32:03 +01:00
2023-12-21 12:31:40 +01:00
# Wait for the postgres service to be ready before starting
2023-12-16 00:32:03 +01:00
wait_for:
- service: postgres[[ .consul.suffix ]]
2023-12-21 12:31:40 +01:00
# Resource allocation
2023-12-16 00:32:03 +01:00
resources:
cpu: 500
memory: 384
prometheus:
metrics_url: http://127.0.0.1:9000/_synapse/metrics
2023-12-21 12:31:40 +01:00
# Element settings.
# Note : element will be served by the nginx container, so all the image, resources etc. are set there
2023-12-16 00:32:03 +01:00
element:
map_style_url: https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx
2024-05-07 15:45:04 +02:00
version: 1.11.66
2024-04-24 21:25:31 +02:00
# Synapse Admin is the admin interface for Synapse
synapse_admin:
version: 0.10.1
2023-12-21 12:31:40 +01:00
# Nginx will servce static files (well-known, element, synapse-admin), and proxy requests to synapse
2023-12-16 00:32:03 +01:00
nginx:
2023-12-21 12:31:40 +01:00
# The image to use
2024-05-07 15:45:04 +02:00
image: '[[ .docker.repo ]]matrix-element:[[ .matrix.element.version ]]-1'
2023-12-16 00:32:03 +01:00
2023-12-21 12:31:40 +01:00
# Resource allocation
2023-12-16 00:32:03 +01:00
resources:
cpu: 20
memory: 16
2023-12-21 12:31:40 +01:00
# Traefik settings, to expose the service
traefik:
enabled: true
2023-12-21 12:31:40 +01:00
2024-04-24 11:35:04 +02:00
auto_rule: false
2023-12-21 12:31:40 +01:00
# Element will need some custom CSP
csp:
2024-05-16 09:20:26 +02:00
script-src: "'self' 'unsafe-eval' https://usercontent.riot.im https://scalar.vector.im"
worker-src: "'self' blob:"
2024-05-16 09:20:26 +02:00
connect-src: "'self' https://scalar.vector.im https://vector.im https://api.maptiler.com"
img-src: "'self' data: blob: https://img.youtube.com https://*.ytimg.com"
frame-src: "'self' blob: https://scalar.vector.im/ https://meet.element.io"
2023-12-21 12:31:40 +01:00
2024-04-24 11:35:04 +02:00
# Admin will apply to requests directed to /_synapse/admin (admin API)
2024-01-19 15:51:08 +01:00
# so you can restrict it further
admin:
2024-01-29 00:10:03 +01:00
traefik:
auto_rule: false
2024-01-31 14:50:08 +01:00
router: admin
2024-04-24 21:25:31 +02:00
# Synapse admin
synapse_admin:
traefik:
auto_rule: false
router: synapse-admin
csp:
script-src: "'self' 'unsafe-inline'"
2023-12-21 12:31:40 +01:00
# Volumes used for data persistance
2023-12-16 00:32:03 +01:00
volumes:
2023-12-21 12:31:40 +01:00
# Synapse will use this volume to store media, signing keys etc.
2023-12-16 00:32:03 +01:00
data:
type: csi
source: "[[ .instance ]]-synapse-data"
prometheus:
# Enable prometheus metrics if available
enabled: '[[ .prometheus.available ]]'