Expose max_upload_size as a configurable option #51
| @ -86,6 +86,8 @@ RETENTION_MAX_LIFETIME=4w | ||||
| #MEDIA_RETENTION_LOCAL_LIFETIME=30d | ||||
| #MEDIA_RETENTION_REMOTE_LIFETIME=14d | ||||
|  | ||||
| MAX_UPLOAD_SIZE=50M | ||||
| 
					
					decentral1se marked this conversation as resolved
					
				 | ||||
|  | ||||
| ## Old Signing Key | ||||
| #OLD_SIGNING_KEY_ID=a_OLDKEYID | ||||
| #OLD_SIGNING_KEY=base64string | ||||
|  | ||||
							
								
								
									
										4
									
								
								abra.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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=v33 | ||||
| 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=v10 | ||||
| export WK_SERVER_VERSION=v1 | ||||
| export WK_CLIENT_VERSION=v1 | ||||
| export PG_BACKUP_VERSION=v1 | ||||
|  | ||||
| @ -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 | ||||
| @ -89,6 +90,7 @@ services: | ||||
|       - LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003} | ||||
|       - LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5} | ||||
|       - WEB_CLIENT_LOCATION | ||||
|       - MAX_UPLOAD_SIZE | ||||
|     networks: | ||||
|       - internal | ||||
|     entrypoint: /docker-entrypoint.sh | ||||
|  | ||||
| @ -130,7 +130,7 @@ log_config: "/data/log.config" | ||||
| media_store_path: "/data/media_store" | ||||
|  | ||||
| # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#max_upload_size  | ||||
| max_upload_size: 50M | ||||
| max_upload_size: {{ or (env "MAX_UPLOAD_SIZE") 50M }} | ||||
| 
					
					decentral1se marked this conversation as resolved
					
				 
				
					
						decentral1se
						commented  Bump the config in  Bump the config in `abra.sh` as well? 
				
					
						cas
						commented  Ah you are correct that it needs to be updated. Ah you are correct that it needs to be updated. 
				
					
						cas
						commented  I have pushed a commit to update config versions. I have pushed a commit to update config versions. | ||||
|  | ||||
| # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#turn | ||||
| {{ if eq (env "TURN_ENABLED") "1" }} | ||||
|  | ||||
| @ -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 }} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	
Is this a change in behaviour with this default? Might be nice to mention it in the release notes.
I believe I have preserved the default (eg, MAX_UPLOAD_SIZE is empty) by using the { or } construction in the templates (they were explicitly set to 50M before). That is an extra protection for people upgrading, and then we set the value explicitly for new installations.