Skip to main content

Module dev

Module dev 

Source
Expand description

The dev supervisor, the same on the machine (--native) and in the container (--inside): it watches the files, rebuilds, restarts the app, and writes one stream of logs. While a build runs, or fails, the last version that built keeps answering.

Modules§

docker
balise dev in Docker. The project’s compose.yaml runs the supervisor (balise dev --inside) in a container; this side checks Docker and the port, gives compose what it derives from the configuration, and relays the container’s logs.

Constants§

GRACE_MARGIN
How much longer than shutdown.timeout the app is given to stop before it is killed.

Functions§

catch_signals
Catches SIGINT and SIGTERM. In a terminal, Ctrl-C reaches the app too, which starts its own shutdown; in a container, only the supervisor gets SIGTERM, and passes it on.
stop_requested
Whether Ctrl-C or SIGTERM asked the supervisor to stop.
supervise
Runs the supervisor of the project at root until stop says so.