Provision and deploy only start things. Removing a host_apps row (or leaving it in place) does not stop running compose projects. Need a first-class stop path: scripts/stop.sh → docker compose down on the matching <app>_<env> project.
Also turn off print_forge (beta + prod) so it stays down across deploys.
Why
Today the only stop is SSH + manual compose down. Next deploy.sh --app <name> (or CI) brings the app back if host_apps still lists it.
Resolve targets from host_apps (including enabled: false rows).
Django/compose apps: docker compose … down with COMPOSE_PROJECT_NAME=<app>_<env> (same checkout / compose file as deploy). Do not pass -v (keep volumes).
Idempotent if already stopped or checkout missing (fallback: stop/rm containers by compose project label).
Node-static: no compose project — skip with a clear message.
Hosts without that app+env: skip, do not fail the whole run.
2. enabled: false on host_apps
Default remains enabled when the key is omitted.
deploy.sh / app-deployskip disabled rows (including explicit --app / --env) so CI cannot resurrect a stopped app.
Keep the row (ports + compose_profiles) so stop still knows where it lived and we can turn it back on later.
3. Turn off print_forge
On adama, roslin, starbuck, apollo, ai-server-4080:
NPM proxy hosts are out of scope (Ansible does not manage NPM). Expect 502 on print-forge-preview.aimloperations.com / prod until those hosts are disabled in NPM.
App-repo CI for print_forge will no-op once disabled (should stay green, just not deploy).
## Summary
Provision and deploy only start things. Removing a `host_apps` row (or leaving it in place) does **not** stop running compose projects. Need a first-class **stop** path: `scripts/stop.sh` → `docker compose down` on the matching `<app>_<env>` project.
Also **turn off `print_forge`** (beta + prod) so it stays down across deploys.
## Why
Today the only stop is SSH + manual `compose down`. Next `deploy.sh --app <name>` (or CI) brings the app back if `host_apps` still lists it.
## Checklist
### 1. `scripts/stop.sh` + `playbooks/stop-apps.yml`
- Mirror `deploy.sh`: optional `[HOST]`, required `--app` / `--env`, `--check` / `--diff`.
- Resolve targets from `host_apps` (including `enabled: false` rows).
- Django/compose apps: `docker compose … down` with `COMPOSE_PROJECT_NAME=<app>_<env>` (same checkout / compose file as deploy). Do **not** pass `-v` (keep volumes).
- Idempotent if already stopped or checkout missing (fallback: stop/rm containers by compose project label).
- Node-static: no compose project — skip with a clear message.
- Hosts without that app+env: skip, do not fail the whole run.
### 2. `enabled: false` on `host_apps`
- Default remains enabled when the key is omitted.
- `deploy.sh` / `app-deploy` **skip** disabled rows (including explicit `--app` / `--env`) so CI cannot resurrect a stopped app.
- Keep the row (ports + `compose_profiles`) so stop still knows where it lived and we can turn it back on later.
### 3. Turn off `print_forge`
On adama, roslin, starbuck, apollo, ai-server-4080:
```yaml
- { name: print_forge, env: prod, port: 8007, enabled: false } # adama: also compose_profiles: [worker]
- { name: print_forge, env: beta, port: 8019, enabled: false }
```
After merge (or from this branch):
```bash
./scripts/stop.sh --app print_forge --env prod
./scripts/stop.sh --app print_forge --env beta
```
NPM proxy hosts are **out of scope** (Ansible does not manage NPM). Expect 502 on `print-forge-preview.aimloperations.com` / prod until those hosts are disabled in NPM.
### 4. Docs
- `README.md` / `IMPLEMENTATION.md`: stop wrapper, `enabled` flag, print_forge marked stopped.
- `scripts/deploy.sh` help unchanged except any note if needed.
## Acceptance criteria
- [ ] `./scripts/stop.sh --app <name> --env <env>` compose-downs that project on all app hosts (or `--limit` one host)
- [ ] `enabled: false` prevents deploy from starting that app+env
- [ ] `print_forge` beta + prod disabled in all `host_vars`
- [ ] Docs updated
## Notes
- Related: [print_forge catalog #27](https://git.aimloperations.com/ai_ml_operations/server-infra/issues/27)
- App-repo CI for `print_forge` will no-op once disabled (should stay green, just not deploy).
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
Provision and deploy only start things. Removing a
host_appsrow (or leaving it in place) does not stop running compose projects. Need a first-class stop path:scripts/stop.sh→docker compose downon the matching<app>_<env>project.Also turn off
print_forge(beta + prod) so it stays down across deploys.Why
Today the only stop is SSH + manual
compose down. Nextdeploy.sh --app <name>(or CI) brings the app back ifhost_appsstill lists it.Checklist
1.
scripts/stop.sh+playbooks/stop-apps.ymldeploy.sh: optional[HOST], required--app/--env,--check/--diff.host_apps(includingenabled: falserows).docker compose … downwithCOMPOSE_PROJECT_NAME=<app>_<env>(same checkout / compose file as deploy). Do not pass-v(keep volumes).2.
enabled: falseonhost_appsdeploy.sh/app-deployskip disabled rows (including explicit--app/--env) so CI cannot resurrect a stopped app.compose_profiles) so stop still knows where it lived and we can turn it back on later.3. Turn off
print_forgeOn adama, roslin, starbuck, apollo, ai-server-4080:
After merge (or from this branch):
NPM proxy hosts are out of scope (Ansible does not manage NPM). Expect 502 on
print-forge-preview.aimloperations.com/ prod until those hosts are disabled in NPM.4. Docs
README.md/IMPLEMENTATION.md: stop wrapper,enabledflag, print_forge marked stopped.scripts/deploy.shhelp unchanged except any note if needed.Acceptance criteria
./scripts/stop.sh --app <name> --env <env>compose-downs that project on all app hosts (or--limitone host)enabled: falseprevents deploy from starting that app+envprint_forgebeta + prod disabled in allhost_varsNotes
print_forgewill no-op once disabled (should stay green, just not deploy).