Register Print Forge (print_forge) for easy deploy beta, same pattern as college_craft (#24) and chat beta (#7).
print_forge
college_craft
App repo: ai_ml_operations/print_forge (default branch master). Django shop + portal + shipping. Prod compose has no bundled Postgres. dj-queue worker singleton on adama only.
ai_ml_operations/print_forge
master
Companion app ticket: print_forge (shop site PR; CI already calls --app print_forge).
--app print_forge
NPM (manual, out of scope for Ansible):
print-forge-preview.aimloperations.com
:8019
printforgeprints.com
:8007
app_catalog
inventory/group_vars/all.yml
print_forge: type: django repo: "{{ git_base_url }}/ai_ml_operations/print_forge.git" default_branch: master 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 college_craft (8006) / abc_worker (8018):
abc_worker
- { name: print_forge, env: prod, port: 8007 } - { name: print_forge, env: beta, port: 8019 }
Worker singleton on adama only (dj-queue, same as monica_site / college_craft):
- { name: print_forge, env: prod, port: 8007, compose_profiles: [worker] } - { name: print_forge, env: beta, port: 8019, compose_profiles: [worker] }
Other hosts: web only — omit compose_profiles.
compose_profiles
10.0.0.230
Create DBs + grant westfarn:
westfarn
print_forge_beta
~/Documents/secrets/print_forge/print_forge_beta.env ~/Documents/secrets/print_forge/print_forge_prod.env
Template: app repo .env.prod.example.
.env.prod.example
Key differences:
DJANGO_ENV
prod
beta
DJANGO_ALLOWED_HOSTS
printforgeprints.com,www.printforgeprints.com
DATABASE_URL
.../print_forge
.../print_forge_beta
WEB_PORT
8007
8019
SITE_UNDER_CONSTRUCTION
true
false
PUBLIC_SITE_URL
https://printforgeprints.com
https://print-forge-preview.aimloperations.com
SHORTENER_BASE_URL
https://shortener-beta.aimloperations.com
Purchased flags: FEATURE_EMAIL_SMS, FEATURE_PAYMENTS, FEATURE_SHOP, FEATURE_SHIPPING. Others stay false. Add a print_forge:<token> entry to SHORTENER_API_TOKENS on url_shortening_service (beta token first).
FEATURE_EMAIL_SMS
FEATURE_PAYMENTS
FEATURE_SHOP
FEATURE_SHIPPING
print_forge:<token>
SHORTENER_API_TOKENS
url_shortening_service
Compose worker service under profile worker. Run on exactly one host (adama) via host_apps.compose_profiles: [worker].
worker
host_apps.compose_profiles: [worker]
IMPLEMENTATION.md
scripts/deploy.sh
--app
~/Documents/repos/server-infra/scripts/deploy.sh --app print_forge --env beta --ref master
Confirm /healthz/ on beta. Prod deploy can wait until NPM + launch.
/healthz/
host_apps
compose_profiles: [worker]
print_forge_beta.env
deploy.sh --app print_forge --env beta
deploy.sh
docker-compose.prod.yml
Companion app ticket: ai_ml_operations/print_forge#1
No dependencies set.
The note is not visible to the blocked user.
Summary
Register Print Forge (
print_forge) for easy deploy beta, same pattern ascollege_craft(#24) and chat beta (#7).App repo:
ai_ml_operations/print_forge(default branchmaster).Django shop + portal + shipping. Prod compose has no bundled Postgres. dj-queue worker singleton on adama only.
Companion app ticket:
print_forge(shop site PR; CI already calls--app print_forge).NPM (manual, out of scope for Ansible):
print-forge-preview.aimloperations.com→ hosts:8019printforgeprints.com(+ www) → hosts:8007— reserve the port now so it matches other apps; do not NPM-route prod until launch.Checklist
1.
app_catalog(inventory/group_vars/all.yml)2. Host ports (
host_varsfor adama, roslin, starbuck, apollo, ai-server-4080)Next free Django ports after
college_craft(8006) /abc_worker(8018):Worker singleton on adama only (dj-queue, same as monica_site / college_craft):
Other hosts: web only — omit
compose_profiles.3. Postgres on
10.0.0.230Create DBs + grant
westfarn:print_forge_beta(beta) — required for this ticketprint_forge(prod) — create so prod secrets/port are ready; no public NPM until launch4. Secrets (control node)
Template: app repo
.env.prod.example.Key differences:
DJANGO_ENVprodbetaDJANGO_ALLOWED_HOSTSprintforgeprints.com,www.printforgeprints.comprint-forge-preview.aimloperations.comDATABASE_URL.../print_forge.../print_forge_betaWEB_PORT80078019SITE_UNDER_CONSTRUCTIONtrueuntil launchfalsePUBLIC_SITE_URLhttps://printforgeprints.comhttps://print-forge-preview.aimloperations.comSHORTENER_BASE_URLhttps://shortener-beta.aimloperations.comPurchased flags:
FEATURE_EMAIL_SMS,FEATURE_PAYMENTS,FEATURE_SHOP,FEATURE_SHIPPING. Others stay false. Add aprint_forge:<token>entry toSHORTENER_API_TOKENSonurl_shortening_service(beta token first).5. Task worker (singleton)
Compose
workerservice under profileworker. Run on exactly one host (adama) viahost_apps.compose_profiles: [worker].6. Docs + deploy script
IMPLEMENTATION.mdapps / ports / NPM / DB tablesscripts/deploy.shhelp--applist to includeprint_forge7. Deploy smoke (after secrets + DBs exist)
Confirm
/healthz/on beta. Prod deploy can wait until NPM + launch.Acceptance criteria
print_forgeinapp_cataloghost_appson adama, roslin, starbuck, apollo, ai-server-4080 (port 8019); adama hascompose_profiles: [worker]print_forge_betaPostgres DB +print_forge_beta.envon the control nodedeploy.sh --app print_forge --env betasucceedsprint-forge-preview.aimloperations.comactive/active to:8019IMPLEMENTATION.mdanddeploy.shhelp updatedNotes
master(--app print_forge).host_appseven if NPM/prod secrets wait.docker-compose.prod.yml.Companion app ticket: ai_ml_operations/print_forge#1