check / check (push) Successful in 48s
The root Dockerfile builds the only image; Dockerfile.backend is gone. Its stages: lint, a Go stage that runs the tests and builds netwatch-server, the node stage, and an nginx runtime. nginx serves dist/ on 8080 and proxies /api/ and /.well-known/healthcheck to the backend on 127.0.0.1:8081. bin/entrypoint.sh starts both, turns TERM or INT into a stop of both, and exits non-zero when either exits on its own. The backend runs as user netwatch and keeps reports on the /data volume. New setting BIND_ADDRESS (empty: every interface). STOPSIGNAL is SIGTERM, since the nginx image's SIGQUIT would miss the entrypoint. script/docker is the org model verbatim. Model: opus-5-5
22 lines
658 B
Bash
Executable File
22 lines
658 B
Bash
Executable File
#!/bin/sh
|
|
# script/lint: lint the whole repo: prettier over the frontend, then the
|
|
# Go linter over backend/.
|
|
#
|
|
# The Go linter runs only in Docker: this builds the lint stage of
|
|
# Dockerfile, the digest-pinned golangci-lint image, which runs the
|
|
# backend's fmt-check and lint targets. --no-cache makes the linter
|
|
# really run every time rather than reuse an earlier result, and the
|
|
# stage is built for its checks alone, so no image is kept.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
"$ROOT/script/frontend-lint"
|
|
timeout 300 docker build --no-cache --target lint \
|
|
--output type=cacheonly .
|
|
}
|
|
|
|
main "$@"
|