The image creates SWW_STATE_DIR when it is missing (closes #337)
check / check (push) Waiting to run
check / check (push) Waiting to run
Before `waf` starts, the image's `run` script now makes `SWW_STATE_DIR` if it is missing (`mkdir -p`), gives it to `sww:sww` and sets its mode to `0700`, as it already does for the cache directory's owner. A value that is not an absolute path, or an unreadable `SWW_STATE_DIR_FILE`, still changes nothing, and `waf` stops naming the setting. The `Dockerfile` comment, `docs/image.md`, `docs/settings.md` and `SPEC.md` say the image makes the directory. `script/example-app` checks that a missing `SWW_STATE_DIR` is made, owned by `sww` with mode `0700`. - `chmod 0700` also applies to an existing directory, a mounted volume included, at every start of `waf`. Model: opus-5-5
This commit was merged in pull request #351.
This commit is contained in:
1 parent
b93bad5842
commit
697c2225d9
6 files changed
+40
-32
No files matched your search
+1
-1
@@ -53,7 +53,7 @@ the two (see "The image's command" below).
|
||||
## State and cache files
|
||||
|
||||
- `SWW_STATE_DIR` (default `/var/lib/sww`): the directory of the state files, an
|
||||
absolute path that exists and can be written.
|
||||
absolute path that can be written. The image's `run` script makes it.
|
||||
- `SWW_STATE_WRITE_DELAY` (default `10s`): how long `bans.json` waits to be
|
||||
written after a ban is made, lifted or made permanent. A duration.
|
||||
- `SWW_STATE_COUNTER_INTERVAL` (default `15m`): how often every state and cache
|
||||
|
||||
Reference in new issue
Block a user