You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): add --app flag to host-targeted commands
Adds --app <name> to status, stats, log, lock, unlock, maintenance on/off,
start, stop, restart, env set/get/list/unset, and accessory list. With
--app + --host these commands resolve the target app from server-side
state instead of requiring a teploy.yml in the cwd — the same pattern
rollback --app already used.
Motivation: teploy-dash shells out to the CLI for these actions but has
no app directory on disk. Previously it could only pass --host, so the
CLI fell back to config.LoadApp(".") and either failed or acted on the
wrong app. Now dash can target any {server, app} pair.
New shared resolveApp(ctx, flags, appName) helper in connect.go unifies
the two resolution paths:
- appName == "": load teploy.yml from cwd, connect to its server
- appName != "": require --host, read deploy state from server (no
teploy.yml needed); Domain is enriched from state for commands that
need it (maintenance)
Notes:
- maintenance keeps its 'requires Caddy-managed ingress' guard only on
the cwd path — server state doesn't record ingress mode, so --app
assumes default Caddy ingress.
- accessory stop/start/logs/upgrade/backup/restore still need accessory
config from teploy.yml and remain cwd-bound; only 'accessory list'
(read-only) gained --app.
Verified end-to-end on a live VM: status/env/lock/unlock/restart/log
--app all work from a directory with no teploy.yml; the --host-required
guard fires cleanly. Unit tests cover the guard + the no-config error.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ All notable changes to teploy are documented here. Format follows [Keep a Change
5
5
## [Unreleased]
6
6
7
7
### Added
8
+
-`--app <name>` flag on `status`, `stats`, `log`, `lock`, `unlock`, `maintenance on/off`, `start`, `stop`, `restart`, `env set/get/list/unset`, and `accessory list`. With `--app` + `--host`, these commands act on a deployed app by reading server-side state instead of requiring a `teploy.yml` in the working directory — the same model `rollback --app` already used. This is what lets teploy-dash (and any automation without an app checkout) drive these commands for arbitrary apps. A shared `resolveApp` helper unifies the cwd-`teploy.yml` path and the `--app`+`--host` path. `maintenance` keeps its Caddy-ingress guard only on the cwd path (server state doesn't record ingress mode); the accessory subcommands that need accessory config from `teploy.yml` (stop/start/logs/upgrade/backup/restore) remain cwd-bound, only `accessory list` gained `--app`.
8
9
-`keep_versions: N` — auto-prune older app versions on deploy. The current and immediately-previous versions are always protected; older versions beyond `N` are removed (containers + images). Container-deploy only — static deploys use `keep_releases`. Default `0` = keep everything (legacy behavior).
9
10
-`healthcheck.<proc>.disable` — per-process override that passes `--no-healthcheck` to `docker run`. Useful for worker containers that share an image with a web container and would otherwise inherit a useless HTTP healthcheck.
10
11
-`ingress: external` — opt out of Caddy entirely. The container still joins the `teploy` Docker network with its app-name alias, but Teploy doesn't write or reload the Caddyfile. For users fronting the app with Cloudflare Tunnel, Tailscale Funnel, nginx, AWS ALB, or any other external ingress.
0 commit comments