Compare commits
1
Commits
next
...
ce741c2e11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce741c2e11 |
@@ -1954,8 +1954,14 @@ main "$@"
|
|||||||
without one, it still starts. At each start the `run` script of `smallwebwaf`
|
without one, it still starts. At each start the `run` script of `smallwebwaf`
|
||||||
gives that directory and every file in it to the `smallwebwaf` user, so a host
|
gives that directory and every file in it to the `smallwebwaf` user, so a host
|
||||||
directory mounted there needs no change of owner.
|
directory mounted there needs no change of owner.
|
||||||
- `docker stop` has runit stop both processes. `smallwebwaf` then stops taking
|
- `docker stop` has runit stop both processes at once, each with SIGTERM.
|
||||||
requests and gives those in progress five seconds to finish.
|
`smallwebwaf` then stops taking requests and gives those in progress five
|
||||||
|
seconds to finish, which they can do only while the app still answers. An app
|
||||||
|
that exits at once on SIGTERM ends them: the client gets `502`, or a response
|
||||||
|
cut short if the app had already begun to answer. An app that should let them
|
||||||
|
finish keeps taking and answering requests, not only the ones it already has,
|
||||||
|
for the whole five seconds after SIGTERM, since `smallwebwaf` can still pass
|
||||||
|
it requests it took before then.
|
||||||
|
|
||||||
A rule file is one rule per line: a name, what to match against, what to do, and
|
A rule file is one rule per line: a name, what to match against, what to do, and
|
||||||
a regex.
|
a regex.
|
||||||
|
|||||||
@@ -1324,9 +1324,16 @@ The two processes:
|
|||||||
- A `smallwebwaf` that stops at start, for example on invalid configuration, is
|
- A `smallwebwaf` that stops at start, for example on invalid configuration, is
|
||||||
started again every second and stops again, logging its message each time,
|
started again every second and stops again, logging its message each time,
|
||||||
until the cause is fixed. The health check fails meanwhile.
|
until the cause is fixed. The health check fails meanwhile.
|
||||||
- `docker stop` sends SIGTERM to `runsvinit`, which has runit stop both
|
- `docker stop` sends SIGTERM to `runsvinit`, which has runit stop both services
|
||||||
services, each with SIGTERM, and exits once they have stopped. `smallwebwaf`
|
at once, each with SIGTERM, and exits once they have stopped. `smallwebwaf`
|
||||||
writes its state files as it stops (see "Persistent state").
|
stops taking requests, gives those in progress five seconds to finish, and
|
||||||
|
writes its state files as it stops (see "Persistent state"). The requests in
|
||||||
|
progress can finish only while the app still answers. An app that exits at
|
||||||
|
once on SIGTERM ends them: the client gets `502`, or a response cut short if
|
||||||
|
the app had already begun to answer. An app that should let them finish keeps
|
||||||
|
taking and answering requests, not only the ones it already has, for the whole
|
||||||
|
five seconds after SIGTERM, since `smallwebwaf` can still pass it requests it
|
||||||
|
took before then.
|
||||||
- The container's root filesystem stays writable: runit writes each service's
|
- The container's root filesystem stays writable: runit writes each service's
|
||||||
status into its directory under `/etc/service`.
|
status into its directory under `/etc/service`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user