mirror of
git://f0xx.org/android_cast
synced 2026-07-29 07:39:15 +03:00
next/side sync
This commit is contained in:
71
examples/app_hub/DEPLOY.md
Normal file
71
examples/app_hub/DEPLOY.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Landing + androidcast — BE only, port 80
|
||||
|
||||
**Full topology:** [docs/INFRA.md](../../docs/INFRA.md) — read after any agent/context reset.
|
||||
|
||||
Public: `https://apps.f0xx.org/app/androidcast_project/`
|
||||
|
||||
## Topology (no :8089)
|
||||
|
||||
```text
|
||||
Browser → apps.f0xx.org (Gentoo FE, TLS)
|
||||
→ http://artc0.intra.raptor.org:80 ← this vhost only
|
||||
→ /etc/nginx/conf.d/apps.conf listen 80
|
||||
```
|
||||
|
||||
**8089 is not this installation** (Janus/other). Do not point androidcast FE locations at :8089.
|
||||
|
||||
On FE, hub and (if you fix it) crashes should both target **`http://artc0.intra.raptor.org:80`**, same as `location /`.
|
||||
|
||||
## 1. `index.html`
|
||||
|
||||
```bash
|
||||
cp .../android_cast/examples/app_hub/index.html \
|
||||
.../htdocs/apps/app/androidcast_project/index.html
|
||||
```
|
||||
|
||||
## 2. BE nginx
|
||||
|
||||
Edit **`/etc/nginx/conf.d/apps.conf`** on Alpine (sshfs: `tmp/BE_alpine/etc/nginx/...`).
|
||||
|
||||
Replace the whole **`server { listen 80; ... }`** block with:
|
||||
|
||||
**`examples/crash_reporter/backend/nginx.apps-port80.fragment`**
|
||||
|
||||
That file has hub + crashes + assets on **port 80**.
|
||||
|
||||
The **`listen 443 ssl`** block can stay for direct HTTPS to the VM if you use it internally; public traffic from FE never needs it for this app.
|
||||
|
||||
Use prefix location for the hub (not `alias` to a single file):
|
||||
|
||||
```nginx
|
||||
location /app/androidcast_project/ {
|
||||
alias /var/www/localhost/htdocs/apps/app/androidcast_project/;
|
||||
index index.html;
|
||||
}
|
||||
```
|
||||
|
||||
## 3. Reload BE
|
||||
|
||||
```bash
|
||||
ssh alpine-be 'sudo nginx -t && sudo rc-service nginx reload'
|
||||
```
|
||||
|
||||
## 4. Verify
|
||||
|
||||
```bash
|
||||
curl -sS -o /dev/null -w "%{http_code}\n" -H "Host: apps.f0xx.org" \
|
||||
"http://artc0.intra.raptor.org/app/androidcast_project/"
|
||||
|
||||
curl -sS -o /dev/null -w "%{http_code}\n" \
|
||||
"https://apps.f0xx.org/app/androidcast_project/"
|
||||
```
|
||||
|
||||
## FE (optional, not required if `location /` already proxies to :80)
|
||||
|
||||
If crashes on FE still say `proxy_pass https://artc0...:8089/.../crashes/`, change to:
|
||||
|
||||
```nginx
|
||||
proxy_pass http://artc0.intra.raptor.org/app/androidcast_project/crashes/;
|
||||
```
|
||||
|
||||
(same upstream as the hub — port **80**, no TLS to BE from FE)
|
||||
@@ -1,11 +1,8 @@
|
||||
# Project hub
|
||||
|
||||
```bash
|
||||
cp examples/app_hub/index.html /var/www/localhost/htdocs/apps/app/androidcast_project/
|
||||
```
|
||||
**Infra overview:** [docs/INFRA.md](../../docs/INFRA.md)
|
||||
|
||||
Nginx (`nginx.apps.conf.fragment`): serve that directory — **not** `alias …/index.html` (that causes 502).
|
||||
**BE only.** FE `apps.f0xx.org` sends `location /` → `http://artc0.intra.raptor.org:80` (not :8089).
|
||||
|
||||
```bash
|
||||
nginx -t && rc-service nginx reload
|
||||
```
|
||||
See **[DEPLOY.md](DEPLOY.md)** — edit `listen 80` in `tmp/BE_alpine/etc/nginx/conf.d/apps.conf` using
|
||||
`examples/crash_reporter/backend/nginx.apps-port80.fragment`.
|
||||
|
||||
15
examples/app_hub/deploy/BE-apps-hub.conf.snippet
Normal file
15
examples/app_hub/deploy/BE-apps-hub.conf.snippet
Normal file
@@ -0,0 +1,15 @@
|
||||
# Replace the broken hub block in /etc/nginx/conf.d/apps.conf on Alpine BE.
|
||||
# Remove duplicate "return 301 .../crashes/" and alias-to-index.html lines.
|
||||
|
||||
location = /app/androidcast_project {
|
||||
return 301 /app/androidcast_project/;
|
||||
}
|
||||
|
||||
location /app/androidcast_project/ {
|
||||
alias /var/www/localhost/htdocs/apps/app/androidcast_project/;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location ^~ /app/androidcast_project/crashes/assets/ {
|
||||
alias /var/www/localhost/htdocs/apps/app/androidcast_project/android_cast/examples/crash_reporter/backend/public/assets/;
|
||||
}
|
||||
Reference in New Issue
Block a user