Skip to content

Commit bda8eba

Browse files
author
Justin Reagor
committed
Update documentation to reflect config of special signal events
1 parent c40a539 commit bda8eba

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/30-configuration/34-jobs.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ Additionally, jobs may react to these events:
2929
- `enterMaintenance`: published when the [control plane](./30-configuration/37-control-plane.md) is told to enter maintenance mode for the container. All jobs will be automatically deregistered from Consul when this happens, so you only want to react to this event if there is some other task to perform.
3030
- `exitMaintenance`: published when the [control plane](./30-configuration/37-control-plane.md) is told to exit maintenance mode for the container.
3131

32+
Finally, there are two special `source` values that can be used to trigger a job when ContainerPilot receives a UNIX signal.
33+
34+
- `SIGHUP`: published when a ContainerPilot process receives the UNIX signal `SIGHUP`.
35+
- `SIGUSR2`: published when a ContainerPilot process receives the UNIX signal `SIGUSR2`.
36+
37+
Signal events come in handy when you need to kick off some type of special process (reloading configs, publishing debug info) inside a container. This type of external communication is only supported when running ContainerPilot within a Docker container running on a Docker host, or under the supervision of a scheduler like Nomad.
38+
39+
Note: Either two signals can be sent to ContainerPilot acting as a PID 1 supervisor or its standalone worker process.
40+
3241
## Configuration
3342

3443
Job configurations include the following fields:

0 commit comments

Comments
 (0)