mirror of
git://f0xx.org/android_cast
synced 2026-07-29 05:58:14 +03:00
url shortener addons
This commit is contained in:
41
backend/url-shortener/DEPLOY.md
Normal file
41
backend/url-shortener/DEPLOY.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# URL shortener — deploy (FE → BE)
|
||||
|
||||
**Topology:** same as [INFRA.md](../../docs/INFRA.md) — TLS on Gentoo FE, app on Alpine BE `:80`.
|
||||
|
||||
## Prerequisites (confirmed)
|
||||
|
||||
| Item | Status |
|
||||
|------|--------|
|
||||
| DNS `s.f0xx.org` → FE | PO |
|
||||
| FE TLS cert | `/etc/letsencrypt/live/s.f0xx.org/` |
|
||||
| Git remote | `git://f0xx.org/androicast_project/url-shortener` |
|
||||
| MariaDB schema `url_shortener` | `sql/schema.mariadb.sql` |
|
||||
|
||||
## FE (Gentoo)
|
||||
|
||||
Add `deploy/nginx.fe-s.f0xx.org.snippet` inside a new `server { listen 443 ssl; server_name s.f0xx.org; }` block
|
||||
(mirror `apps.f0xx.org` TLS paths; cert paths above).
|
||||
|
||||
```bash
|
||||
nginx -t && rc-service nginx reload
|
||||
```
|
||||
|
||||
## BE (Alpine)
|
||||
|
||||
1. Sync this tree to docroot (suggested): `/var/www/localhost/htdocs/apps/s/`
|
||||
2. Include `deploy/nginx.be-url-shortener.fragment` in `apps.conf` **or** dedicated `server_name` on BE
|
||||
3. Apply SQL migration
|
||||
4. `rc-service php-fpm81 restart` if needed
|
||||
|
||||
```bash
|
||||
nginx -t && rc-service nginx reload
|
||||
```
|
||||
|
||||
## Verify
|
||||
|
||||
```bash
|
||||
curl -sSI https://s.f0xx.org/api/v1/health
|
||||
./scripts/smoke_shorten.sh
|
||||
```
|
||||
|
||||
Not added to `validate_be_services.sh` until first production deploy (SPEC).
|
||||
Reference in New Issue
Block a user