Entrypoint steps are functions called from main (closes #163)
check / check (push) Waiting to run
check / check (push) Waiting to run
bin/entrypoint.sh was top-level code with one helper; the shell section of the code style guide asks for every step in a function and a main called at the end. The PORT and TRUSTED_PROXIES checks, the data directory, starting each process, the wait loop, stopping both and the exit are now functions, which main calls in order, setting the stop trap before either process starts. It stays POSIX sh with no set -e. Messages and exit codes are unchanged; the 8081 message is passed to echo as two arguments so its line fits in 80 columns. Model: opus-5-5
This commit was merged in pull request #180.
This commit is contained in:
@@ -21,6 +21,13 @@ Run `make frontend-viewport-test` in CI as its own step; it is not part of
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-19: `bin/entrypoint.sh` has each of its steps in a function, and a
|
||||
`main` at the end calls them in order, as the shell section of the code style
|
||||
guide asks ([#163](https://git.eeqj.de/sneak/netwatch/issues/163)). It is
|
||||
still POSIX sh with no `set -e`, and does what it did, with the same messages
|
||||
and exit codes. Checked by running the image with each script: a normal start,
|
||||
bad `PORT`, `TRUSTED_PROXIES` and `DATA_DIR` values, `docker stop`, INT, and
|
||||
nginx exiting on its own
|
||||
- 2026-10-19: while report files cannot be written, the health check answers 503
|
||||
with `"status":"error"` and the same fields, so the image's `HEALTHCHECK`
|
||||
reports the container `unhealthy`
|
||||
|
||||
Reference in New Issue
Block a user