Fix proxy headers and help sync boot
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-13 21:31:46 +01:00
parent 9cf6e9d94d
commit d9568be579
3 changed files with 46 additions and 0 deletions

View File

@@ -53,6 +53,23 @@ refresh_config_cache() {
php artisan view:clear >/dev/null 2>&1 || true
}
ensure_help_cache() {
cd "$APP_TARGET"
if [[ "${HELP_SYNC_ON_BOOT:-auto}" == "0" ]]; then
return
fi
if [[ "${HELP_SYNC_ON_BOOT:-auto}" == "1" ]]; then
php artisan help:sync >/dev/null 2>&1 || true
return
fi
if ! compgen -G "$APP_TARGET/storage/app/help/*/*/articles.json" > /dev/null; then
php artisan help:sync >/dev/null 2>&1 || true
fi
}
wait_for_service() {
local name="$1" host="$2" port="$3" timeout="$4"
local start
@@ -120,6 +137,7 @@ ensure_helper_scripts
prepare_storage
refresh_config_cache
wait_for_dependencies
ensure_help_cache
cd "$APP_TARGET"
exec "$@"

View File

@@ -20,6 +20,10 @@ server {
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
fastcgi_param HTTP_X_FORWARDED_HOST $http_x_forwarded_host;
fastcgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_buffer_size 32k;
fastcgi_buffers 8 16k;
}