Wire monica_site into the deploy pipeline for prod and beta.
monica_site
App repo: ai_ml_operations/monica_site (default branch main). NPM (manual, out of scope for Ansible — Ryan will configure):
ai_ml_operations/monica_site
main
mkdrealtor.com
:8004
monica-preview.aimloperations.com
:8014
app_catalog
inventory/group_vars/all.yml
monica_site: type: django repo: "{{ git_base_url }}/ai_ml_operations/monica_site.git" default_branch: main compose_file: docker-compose.prod.yml web_service: web migrate_cmd: "uv run python manage.py migrate --noinput"
host_vars
Next free Django ports after chat_backend (8003/8013):
- { name: monica_site, env: prod, port: 8004 } - { name: monica_site, env: beta, port: 8014 }
10.0.0.230
Create DBs + grant westfarn:
westfarn
monica_site_beta
~/Documents/secrets/monica_site/monica_site_prod.env ~/Documents/secrets/monica_site/monica_site_beta.env
Templates live in the app repo as .env.prod.example.
.env.prod.example
Key differences:
DJANGO_ENV
prod
beta
DJANGO_ALLOWED_HOSTS
mkdrealtor.com,www.mkdrealtor.com
DATABASE_URL
.../monica_site
.../monica_site_beta
WEB_PORT
8004
8014
SITE_UNDER_CONSTRUCTION
true
false
monica_site uses dj-queue (Django Tasks, Postgres-backed). Compose has a worker service under profile worker.
worker
Run the worker on exactly ONE host (not all active/active web replicas):
docker compose -f docker-compose.prod.yml --profile worker up -d
Document which host owns the worker (recommend: adama).
Catalog today only knows web + migrate — call out worker start in deploy docs / playbook notes if needed.
web
IMPLEMENTATION.md
scripts/deploy.sh
--app
~/Documents/repos/server-infra/scripts/deploy.sh --app monica_site --env beta --ref main ~/Documents/repos/server-infra/scripts/deploy.sh --app monica_site --env prod --ref main
Confirm /healthz/ on both; prod should redirect public traffic to under-construction; beta serves full site.
/healthz/
scha
10.0.0.128:11434
No dependencies set.
The note is not visible to the blocked user.
Summary
Wire
monica_siteinto the deploy pipeline for prod and beta.App repo:
ai_ml_operations/monica_site(default branchmain).NPM (manual, out of scope for Ansible — Ryan will configure):
mkdrealtor.com(+ www) → hosts:8004monica-preview.aimloperations.com→ hosts:8014Checklist
1.
app_catalog(inventory/group_vars/all.yml)2. Host ports (
host_varsfor adama, roslin, ai-server-4080)Next free Django ports after chat_backend (8003/8013):
3. Postgres on
10.0.0.230Create DBs + grant
westfarn:monica_site(prod)monica_site_beta(beta)4. Secrets (control node)
Templates live in the app repo as
.env.prod.example.Key differences:
DJANGO_ENVprodbetaDJANGO_ALLOWED_HOSTSmkdrealtor.com,www.mkdrealtor.commonica-preview.aimloperations.comDATABASE_URL.../monica_site.../monica_site_betaWEB_PORT80048014SITE_UNDER_CONSTRUCTIONtrue(holding page until launch)false(full app)5. Task worker (singleton)
monica_siteuses dj-queue (Django Tasks, Postgres-backed). Compose has aworkerservice under profileworker.Run the worker on exactly ONE host (not all active/active web replicas):
Document which host owns the worker (recommend: adama).
Catalog today only knows
web+ migrate — call out worker start in deploy docs / playbook notes if needed.6. Docs
IMPLEMENTATION.mdapps/ports/NPM/DB tablesscripts/deploy.shhelp--applist if it enumerates apps7. Deploy smoke
Confirm
/healthz/on both; prod should redirect public traffic to under-construction; beta serves full site.Notes
scha).10.0.0.128:11434(app-side config; no infra change required beyond host network reachability).