Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/how-to/apps/apppack_toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ The command used to perform a one-time cleanup before destroying a review app. T
## `[services.<name>]`

Only applicable if `build.system` is set to `dockerfile`. For buildpacks, the `Procfile` is used instead.
Each table defines a service your app will run.
Each table defines a service your app will run. `<name>` is what the
`apppack ps` and `apppack logs` commands call a process type (e.g. `web`,
`worker`). For buildpack apps, process types come from the `Procfile`
instead.

* Type: `table`
* Values: Must have a `command` key
Expand All @@ -117,3 +120,17 @@ The command used to run the service.
* Values: A command, e.g. `"npm start"`
* Default: `""`
* Required: Yes

## Reserved process types

`apppack ps`, `apppack logs`, and `apppack ps resize`/`scale`/`restart` also accept a few process types that AppPack creates itself, not ones defined under `[services.<name>]`:

* `release` runs `[deploy].release_command` (or a buildpack's `release` Procfile line) before a deploy.
* `scheduler` runs the commands configured with `apppack scheduled-tasks`.
* `shell` is the one-off task started by `apppack ps exec`, `apppack db shell`, and similar interactive shell commands.
* `postdeploy` runs `[review_app].initialize_command` on a new review app.
* `pr-predestroy` runs `[review_app].pre_destroy_command` before a review app is destroyed.

None of these 5 are backed by a long-running ECS service, each gets its own ECS task definition registered fresh whenever it runs, so `apppack ps` won't list one until it's actually running. `apppack ps resize` works on all 5 ahead of time regardless, the CPU/memory you set is stored and applied the next time that process type runs.

The `[test]` command isn't a process type at all. It runs inside the build container as part of the build itself, not as a separate ECS task, so it never shows up in `apppack ps`.
Loading