Register url_shortening_service for django deploy (closes #22) (#23)
Sync runner checkout / sync (push) Successful in 6s

## Summary
- Closes [#22](#22).
- Register `url_shortening_service` in `app_catalog` (`type: django`, repo `ai_ml_operations/url_shortening_service`, default branch `master`) and `host_apps` on **adama**, **roslin**, **starbuck**, **apollo**, and **ai-server-4080** (prod **8005**, beta **8015**).
- Document NPM (short host vs API host, same container), Postgres DBs (`url_shortener` / `url_shortener_beta`), and extra env keys. No compose worker profile.
- List `url_shortening_service` in `scripts/deploy.sh` `--app` help.

## Out of scope (manual ops)
- Create Postgres DBs `url_shortener` / `url_shortener_beta` + grant `westfarn` on `10.0.0.230`
- Control-node secrets under `~/Documents/secrets/url_shortening_service/`
- NPM proxy hosts (Ryan): short host `/` + `/[a-z0-9]{4,8}` (404 `/api/`, `/admin/`, `/debug/`); API host `/api/` only (404 `/admin/`)
- Deploy smoke — [url_shortening_service](https://git.aimloperations.com/ai_ml_operations/url_shortening_service) `master` is still a stub (`README.md` only)

## Test plan
- [x] Inventory YAML: `url_shortening_service` in `app_catalog`; every host `host_apps` has prod **8005** / beta **8015**
- [ ] After app compose + secrets + DBs exist: `./scripts/deploy.sh --app url_shortening_service --env beta --ref master`
- [ ] Same for prod
- [ ] `GET /healthz/` → `{"status":"ok"}` on both ports
- [ ] Short host `GET /` landing page; `POST /api/links/` without Bearer → 401; public `/admin/` → 404

Reviewed-on: #23
This commit was merged in pull request #23.
This commit is contained in:
2026-08-30 04:51:31 -07:00
parent ec294a1d45
commit 9208e63491
8 changed files with 35 additions and 3 deletions
+8
View File
@@ -112,6 +112,14 @@ app_catalog:
migrate_cmd: "uv run python manage.py migrate --noinput"
# dj-queue worker = compose profile `worker` (singleton). Deploy starts it
# via host_apps.compose_profiles on adama only (see host_vars/adama.yml).
url_shortening_service:
type: django
repo: "{{ git_base_url }}/ai_ml_operations/url_shortening_service.git"
default_branch: master
compose_file: docker-compose.prod.yml
web_service: web
migrate_cmd: "uv run python manage.py migrate --noinput"
# No compose worker profile. Two public NPM hosts share one container/port.
# Deploy filter vars. CI passes these; manual runs may leave them undefined
# to (re)deploy every app listed in the host's host_apps.