++ fix restore backup

This commit is contained in:
2026-07-29 17:56:52 +02:00
parent 7ac454cd25
commit 8dee7b1f44
9 changed files with 237 additions and 24 deletions

View File

@@ -118,6 +118,28 @@ map \$host \$app_forwarded_proto {
EOF
ok "Forwarded scheme set to ${FORWARDED_PROTO}."
# -----------------------------------------------------------------------------
# 2c. Upload ceiling, from a single variable.
# nginx, PHP and the Laravel validation rule must agree: when they don't,
# the smallest one wins and does so badly — nginx answers 413 with no body
# after accepting zero bytes, so the browser's upload bar simply freezes and
# the page has nothing to report. MAX_UPLOAD_MB drives all three
# (config/app.php reads the same variable for the validation rule).
# -----------------------------------------------------------------------------
MAX_UPLOAD_MB="${MAX_UPLOAD_MB:-2048}"
cat > /etc/nginx/conf.d/upload-limit.conf <<EOF
client_max_body_size ${MAX_UPLOAD_MB}m;
EOF
cat > /usr/local/etc/php/conf.d/zz-upload-limit.ini <<EOF
; Generated by entrypoint.sh from MAX_UPLOAD_MB — do not edit by hand.
; The zz- prefix makes it load after custom.ini, so these win.
upload_max_filesize = ${MAX_UPLOAD_MB}M
post_max_size = ${MAX_UPLOAD_MB}M
EOF
ok "Upload ceiling set to ${MAX_UPLOAD_MB} MB."
# -----------------------------------------------------------------------------
# 3. Storage symlink (public/storage -> storage/app/public)
# -----------------------------------------------------------------------------