Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-02-18 15:17:46 +03:00
parent c3a1627152
commit 13f8801379

View File

@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
umask 022
export NODE_OPTIONS="--max_old_space_size=4096" export NODE_OPTIONS="--max_old_space_size=4096"
export CI="true" export CI="true"
@@ -74,6 +75,20 @@ ensure_pdf_fonts() {
fi fi
} }
ensure_ui_permissions() {
ui_root="$APP_DIR/ui/dist/spa"
if [[ ! -d "$ui_root" ]]; then
echo "ERROR: UI build output not found at $ui_root"
return 1
fi
# Nginx must be able to traverse parent directories and read built assets.
chmod 755 "$APP_DIR" "$APP_DIR/ui" "$APP_DIR/ui/dist" "$ui_root"
find "$ui_root" -type d -exec chmod 755 {} \;
find "$ui_root" -type f -exec chmod 644 {} \;
}
build_api_binary() { build_api_binary() {
if ! command -v go >/dev/null 2>&1; then if ! command -v go >/dev/null 2>&1; then
echo "go command not found; cannot build backend binary." echo "go command not found; cannot build backend binary."
@@ -129,6 +144,9 @@ run_deploy() {
npm run build npm run build
echo "== ENSURE UI PERMISSIONS =="
ensure_ui_permissions
echo "== BUILD API ==" echo "== BUILD API =="
build_api_binary build_api_binary