From db6440b3170463266901277159e268d849fd1946 Mon Sep 17 00:00:00 2001 From: val Date: Wed, 29 Oct 2025 13:49:02 +0100 Subject: [PATCH] fixed MAX_UPLOAD_SIZE and AUTO_JOIN_ROOM_LIST config --- .env.sample | 4 ++++ abra.sh | 4 ++-- compose.yml | 2 ++ homeserver.yaml.tmpl | 7 +++++++ nginx.conf.tmpl | 6 +++--- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index b919531..75533eb 100644 --- a/.env.sample +++ b/.env.sample @@ -39,7 +39,9 @@ PASSWORD_LOGIN_ENABLED=true ## Room auto-join #AUTO_JOIN_ROOM_ENABLED=1 +#AUTO_JOIN_ROOM is deprecated, but kept for backward compatibility. Please use only one, and prefer AUTO_JOIN_ROOM_LIST. #AUTO_JOIN_ROOM="#example:example.com" +#AUTO_JOIN_ROOM_LIST="[\"#room1:example.com\",\"#room2:example.com\"]" ## Logging @@ -86,6 +88,8 @@ RETENTION_MAX_LIFETIME=4w #MEDIA_RETENTION_LOCAL_LIFETIME=30d #MEDIA_RETENTION_REMOTE_LIFETIME=14d +MAX_UPLOAD_SIZE=50M + ## Old Signing Key #OLD_SIGNING_KEY_ID=a_OLDKEYID #OLD_SIGNING_KEY=base64string diff --git a/abra.sh b/abra.sh index adfa806..b123c71 100644 --- a/abra.sh +++ b/abra.sh @@ -1,11 +1,11 @@ export DISCORD_BRIDGE_YAML_VERSION=v2 export ENTRYPOINT_CONF_VERSION=v3 -export HOMESERVER_YAML_VERSION=v32 +export HOMESERVER_YAML_VERSION=v34 export LOG_CONFIG_VERSION=v2 export SHARED_SECRET_AUTH_VERSION=v2 export SIGNAL_BRIDGE_YAML_VERSION=v6 export TELEGRAM_BRIDGE_YAML_VERSION=v6 -export NGINX_CONFIG_VERSION=v9 +export NGINX_CONFIG_VERSION=v11 export WK_SERVER_VERSION=v1 export WK_CLIENT_VERSION=v1 export PG_BACKUP_VERSION=v1 diff --git a/compose.yml b/compose.yml index 1dfac80..7442fd6 100644 --- a/compose.yml +++ b/compose.yml @@ -12,6 +12,7 @@ services: - STACK_NAME - NGINX_ACCESS_LOG_LOCATION - NGINX_ERROR_LOG_LOCATION + - MAX_UPLOAD_SIZE configs: - source: nginx_config target: /etc/nginx/nginx.conf @@ -47,6 +48,7 @@ services: - ALLOWED_LIFETIME_MAX - ALLOW_PUBLIC_ROOMS_FEDERATION - AUTO_JOIN_ROOM + - AUTO_JOIN_ROOM_LIST - AUTO_JOIN_ROOM_ENABLED - DISABLE_FEDERATION - DOMAIN diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index c65a019..0fb7002 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -157,8 +157,15 @@ registration_shared_secret: {{ secret "registration" }} {{ if eq (env "AUTO_JOIN_ROOM_ENABLED") "1" }} # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#auto_join_rooms + +# AUTO_JOIN_ROOM only for backwards compatibility +{{ if (env "AUTO_JOIN_ROOM") }} auto_join_rooms: - "{{ env "AUTO_JOIN_ROOM" }}" +{{ else }} +auto_join_rooms: {{ env "AUTO_JOIN_ROOM_LIST" }} +{{ end }} + {{ end }} # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#session_lifetime diff --git a/nginx.conf.tmpl b/nginx.conf.tmpl index 4169fc4..cea4245 100644 --- a/nginx.conf.tmpl +++ b/nginx.conf.tmpl @@ -28,7 +28,7 @@ http { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $host; - client_max_body_size 50M; + client_max_body_size {{ or (env "MAX_UPLOAD_SIZE") "50M" }}; proxy_http_version 1.1; } @@ -37,7 +37,7 @@ http { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $host; - client_max_body_size 50M; + client_max_body_size {{ or (env "MAX_UPLOAD_SIZE") "50M" }}; proxy_http_version 1.1; } @@ -56,7 +56,7 @@ http { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $host; - client_max_body_size 50M; + client_max_body_size {{ or (env "MAX_UPLOAD_SIZE") "50M" }}; proxy_http_version 1.1; } {{ end }}