File tree Expand file tree Collapse file tree 6 files changed +29
-5
lines changed
Expand file tree Collapse file tree 6 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ log_level: info
3030
3131**Note**: _This is just an example, don't copy and paste it! Create your own!_
3232
33+ ### Option: ` upload_limit`
34+
35+ By default, the size limit for uploads (for operations such as imports) is set to
36+ 64MB. This can be increased with this option, for example, `100` would be 100MB.
37+
3338# ## Option: `log_level`
3439
3540The `log_level` option controls the level of log output by the addon and can
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ services:
1919hassio_api : true
2020schema :
2121 log_level : list(trace|debug|info|notice|warning|error|fatal)?
22+ upload_limit : int?
Original file line number Diff line number Diff line change 1+ #! /usr/bin/with-contenv bashio
2+ # ==============================================================================
3+ # Home Assistant Community Add-on: phpMyAdmin
4+ # Configures nginx
5+ # ==============================================================================
6+ declare upload_limit
7+
8+ upload_limit=" 64M"
9+
10+ if bashio::config.has_value ' upload_limit' ; then
11+ upload_limit=$( bashio::config " upload_limit" ) M
12+ fi
13+
14+ sed -i " s/%%upload_limit%%/${upload_limit} /g" \
15+ /etc/nginx/includes/server_params.conf
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ add_header X-Content-Type-Options nosniff;
66add_header X-XSS-Protection "1; mode=block";
77add_header X-Robots-Tag none;
88
9- client_max_body_size 64M ;
9+ client_max_body_size %%upload_limit%% ;
1010
1111location / {
1212 try_files $uri $uri/ /index.php?$query_string;
Original file line number Diff line number Diff line change @@ -11,7 +11,5 @@ opcache.revalidate_freq=2
1111opcache.validate_timestamps =0
1212session.cookie_httponly =1
1313session.use_strict_mode =1
14- php_admin_value[post_max_size] = 64M
15- php_admin_value[upload_max_filesize] = 64M
16-
17-
14+ post_max_size = ${UPLOAD_LIMIT}
15+ upload_max_filesize = ${UPLOAD_LIMIT}
Original file line number Diff line number Diff line change @@ -9,10 +9,15 @@ export SERVICE_HOST
99export SERVICE_PASSWORD
1010export SERVICE_PORT
1111export SERVICE_USERNAME
12+ export UPLOAD_LIMIT=64M
1213
1314SERVICE_HOST=$(bashio::services "mysql" "host")
1415SERVICE_PASSWORD=$(bashio::services "mysql" "password")
1516SERVICE_PORT=$(bashio::services "mysql" "port")
1617SERVICE_USERNAME=$(bashio::services "mysql" "username")
1718
19+ if bashio::config.has_value 'upload_limit' ; then
20+ UPLOAD_LIMIT=$(bashio::config 'upload_limit')M
21+ fi
22+
1823exec php-fpm8 --nodaemonize
You can’t perform that action at this time.
0 commit comments