build: one image, nginx in front of the backend on loopback (closes #52)
check / check (push) Successful in 10s
check / check (push) Successful in 10s
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
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
# script/frontend-check: run the frontend half of the checks only (test,
|
||||
# lint, fmt-check). This exists for the frontend Dockerfile, whose build
|
||||
# stage is a node image with neither Go nor Docker; the backend half is
|
||||
# gated by Dockerfile.backend. Everywhere else, use script/check, which
|
||||
# covers the whole repo. Must not modify any files.
|
||||
# lint, fmt-check). This exists for the frontend stage of Dockerfile, a
|
||||
# node image with neither Go nor Docker; the Dockerfile's lint and
|
||||
# backend build stages gate the backend half. Everywhere else, use
|
||||
# script/check, which covers the whole repo. Must not modify any files.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
Reference in New Issue
Block a user