1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 05:58:14 +03:00
This commit is contained in:
Anton Afanasyeu
2026-05-30 20:59:38 +02:00
parent 350f8343ad
commit 3390298322
3 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
# FE apps.f0xx.org — include from nginx.conf server block.
# Build must use the same upstream style as hub/crashes (BE :443), not :80.
# Redirect without trailing slash
location = /app/androidcast_project/build {
return 301 $scheme://$host/app/androidcast_project/build/;
}
location /app/androidcast_project/build/ {
proxy_pass https://artc0.intra.raptor.org/app/androidcast_project/build/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
client_max_body_size 512m;
}

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Fix builder nginx on sshfs mounts + optional reload on hosts.
set -euo pipefail
REPO="$(cd "$(dirname "$0")/../../.." && pwd)"
BE_NGINX="${BE_NGINX:-$REPO/../../../tmp/BE_alpine/etc/nginx/conf.d}"
FE_NGINX="${FE_NGINX:-$REPO/../../../tmp/FE_gentoo/etc/nginx}"
install -D -m 0644 "$REPO/crash_reporter/backend/nginx.apps-builder.frag" \
"$BE_NGINX/apps_builder.frag"
install -D -m 0644 "$REPO/crash_reporter/backend/nginx.fe-apps.conf.fragment" \
"$FE_NGINX/apps.conf"
if [[ "${1:-}" == "--port80" ]]; then
"$REPO/crash_reporter/backend/scripts/apply-be-port80-nginx.sh" \
"$BE_NGINX/apps.conf"
fi
echo "Installed:"
echo " $BE_NGINX/apps_builder.frag"
echo " $FE_NGINX/apps.conf"
echo
echo "Reload on hosts:"
echo " ssh alpine-be 'sudo nginx -t && sudo rc-service nginx reload'"
echo " # Gentoo FE: sudo nginx -t && sudo rc-service nginx reload"
echo
echo "Verify:"
echo " curl -sSI 'https://apps.f0xx.org/app/androidcast_project/build/' | grep -E 'HTTP|location|x-powered-by'"