FEATURE_BLOG=true. Other FEATURE_* stay false until purchased. If email/SMS or direct mail is turned on later, add a college_craft:<token> entry to SHORTENER_API_TOKENS on url_shortening_service.
Prod also needs TIANJI_WEBSITE_ID + reCAPTCHA keys.
5. Task worker (singleton)
college_craft uses dj-queue (Postgres-backed). Compose has a worker service under profile worker.
Run worker on exactly one host (adama), via host_apps.compose_profiles: [worker] — not all active/active web replicas.
6. Docs + deploy script
Update IMPLEMENTATION.md apps / ports / NPM / DB tables
Update scripts/deploy.sh help --app list to include college_craft
Confirm /healthz/ on both; prod should redirect public traffic to under-construction; beta serves full site.
App-repo companion (college_craft, not this repo)
Deploy workflows still call --app client_site (template leftover). They must become --app college_craft before CI deploy will hit this catalog entry. Default branch is master (not main).
Notes
Prod compose has no bundled Postgres (same pattern as scha / monica_site).
Ollama for social drafting is at 10.0.0.128:11434 (app-side; no infra change beyond host network reachability).
Nominatim address autocomplete: http://10.0.0.128:8089 (already on LAN).
## Summary
Wire `college_craft` into the deploy pipeline for **prod** and **beta**. Same pattern as `monica_site` ([#14](https://git.aimloperations.com/ai_ml_operations/server-infra/issues/14)).
App repo: `ai_ml_operations/college_craft` (default branch **`master`**).
NPM (manual, out of scope for Ansible — Ryan will configure):
- **prod:** `collegecraft.com` (+ www) → hosts `:8006`
- **beta:** `college-craft-preview.aimloperations.com` → hosts `:8016`
## Checklist
### 1. `app_catalog` (`inventory/group_vars/all.yml`)
```yaml
college_craft:
type: django
repo: "{{ git_base_url }}/ai_ml_operations/college_craft.git"
default_branch: master
compose_file: docker-compose.prod.yml
web_service: web
migrate_cmd: "uv run python manage.py migrate --noinput"
```
### 2. Host ports (`host_vars` for adama, roslin, starbuck, apollo, ai-server-4080)
Next free Django ports after `url_shortening_service` (8005/8015):
```yaml
- { name: college_craft, env: prod, port: 8006 }
- { name: college_craft, env: beta, port: 8016 }
```
**Worker singleton on adama only** (dj-queue, same as monica_site):
```yaml
- { name: college_craft, env: prod, port: 8006, compose_profiles: [worker] }
- { name: college_craft, env: beta, port: 8016, compose_profiles: [worker] }
```
Other hosts: web only — omit `compose_profiles`.
### 3. Postgres on `10.0.0.230`
Create DBs + grant `westfarn`:
- `college_craft` (prod)
- `college_craft_beta` (beta)
### 4. Secrets (control node)
```text
~/Documents/secrets/college_craft/college_craft_prod.env
~/Documents/secrets/college_craft/college_craft_beta.env
```
Template: app repo `.env.prod.example`.
Key differences:
| | prod | beta |
|--|--|--|
| `DJANGO_ENV` | `prod` | `beta` |
| `DJANGO_ALLOWED_HOSTS` | `collegecraft.com,www.collegecraft.com` | `college-craft-preview.aimloperations.com` |
| `DATABASE_URL` | `.../college_craft` | `.../college_craft_beta` |
| `WEB_PORT` | `8006` | `8016` |
| `SITE_UNDER_CONSTRUCTION` | `true` (holding page until launch) | `false` (full app) |
| `PUBLIC_SITE_URL` | `https://www.collegecraft.com` | `https://college-craft-preview.aimloperations.com` |
`FEATURE_BLOG=true`. Other `FEATURE_*` stay false until purchased. If email/SMS or direct mail is turned on later, add a `college_craft:<token>` entry to `SHORTENER_API_TOKENS` on `url_shortening_service`.
Prod also needs `TIANJI_WEBSITE_ID` + reCAPTCHA keys.
### 5. Task worker (singleton)
`college_craft` uses **dj-queue** (Postgres-backed). Compose has a `worker` service under profile `worker`.
Run worker on **exactly one host** (adama), via `host_apps.compose_profiles: [worker]` — not all active/active web replicas.
### 6. Docs + deploy script
- Update `IMPLEMENTATION.md` apps / ports / NPM / DB tables
- Update `scripts/deploy.sh` help `--app` list to include `college_craft`
### 7. Deploy smoke (after secrets + DBs exist)
```bash
~/Documents/repos/server-infra/scripts/deploy.sh --app college_craft --env beta --ref master
~/Documents/repos/server-infra/scripts/deploy.sh --app college_craft --env prod --ref master
```
Confirm `/healthz/` on both; prod should redirect public traffic to under-construction; beta serves full site.
## App-repo companion (college_craft, not this repo)
Deploy workflows still call `--app client_site` (template leftover). They must become `--app college_craft` before CI deploy will hit this catalog entry. Default branch is `master` (not `main`).
## Notes
- Prod compose has **no bundled Postgres** (same pattern as `scha` / `monica_site`).
- Ollama for social drafting is at `10.0.0.128:11434` (app-side; no infra change beyond host network reachability).
- Nominatim address autocomplete: `http://10.0.0.128:8089` (already on LAN).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Wire
college_craftinto the deploy pipeline for prod and beta. Same pattern asmonica_site(#14).App repo:
ai_ml_operations/college_craft(default branchmaster).NPM (manual, out of scope for Ansible — Ryan will configure):
collegecraft.com(+ www) → hosts:8006college-craft-preview.aimloperations.com→ hosts:8016Checklist
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
url_shortening_service(8005/8015):Worker singleton on adama only (dj-queue, same as monica_site):
Other hosts: web only — omit
compose_profiles.3. Postgres on
10.0.0.230Create DBs + grant
westfarn:college_craft(prod)college_craft_beta(beta)4. Secrets (control node)
Template: app repo
.env.prod.example.Key differences:
DJANGO_ENVprodbetaDJANGO_ALLOWED_HOSTScollegecraft.com,www.collegecraft.comcollege-craft-preview.aimloperations.comDATABASE_URL.../college_craft.../college_craft_betaWEB_PORT80068016SITE_UNDER_CONSTRUCTIONtrue(holding page until launch)false(full app)PUBLIC_SITE_URLhttps://www.collegecraft.comhttps://college-craft-preview.aimloperations.comFEATURE_BLOG=true. OtherFEATURE_*stay false until purchased. If email/SMS or direct mail is turned on later, add acollege_craft:<token>entry toSHORTENER_API_TOKENSonurl_shortening_service.Prod also needs
TIANJI_WEBSITE_ID+ reCAPTCHA keys.5. Task worker (singleton)
college_craftuses dj-queue (Postgres-backed). Compose has aworkerservice under profileworker.Run worker on exactly one host (adama), via
host_apps.compose_profiles: [worker]— not all active/active web replicas.6. Docs + deploy script
IMPLEMENTATION.mdapps / ports / NPM / DB tablesscripts/deploy.shhelp--applist to includecollege_craft7. Deploy smoke (after secrets + DBs exist)
Confirm
/healthz/on both; prod should redirect public traffic to under-construction; beta serves full site.App-repo companion (college_craft, not this repo)
Deploy workflows still call
--app client_site(template leftover). They must become--app college_craftbefore CI deploy will hit this catalog entry. Default branch ismaster(notmain).Notes
scha/monica_site).10.0.0.128:11434(app-side; no infra change beyond host network reachability).http://10.0.0.128:8089(already on LAN).