Add a Docker HEALTHCHECK and make docker-smoke (closes #111)
check / check (push) Successful in 3m5s
check / check (push) Successful in 3m5s
The runtime stage declares a HEALTHCHECK that probes /.well-known/healthcheck.json with busybox wget. script/docker-smoke (make docker-smoke) builds the image with script/docker, starts it with a random PIXA_SIGNING_KEY, and passes only once Docker reports the container healthy within 30 seconds; the container is removed on exit and its log printed on failure. The Gitea workflow runs it after script/cibuild; it is not part of make check. It waits on Docker's health status instead of polling a published host port because the Gitea job runs in its own container on its own network, where such a port is not reachable at localhost. Model: opus-5-5
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: bootstrap setup check lint test fmt fmt-check build clean docker docker-versioned docker-test devserver devserver-stop hooks
|
||||
.PHONY: bootstrap setup check lint test fmt fmt-check build clean docker docker-smoke docker-versioned docker-test devserver devserver-stop hooks
|
||||
|
||||
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||
LDFLAGS := -X main.Version=$(VERSION)
|
||||
@@ -54,6 +54,11 @@ clean:
|
||||
docker:
|
||||
@script/docker
|
||||
|
||||
# Build the image, start it, and wait for its healthcheck (needs Docker;
|
||||
# not part of check)
|
||||
docker-smoke:
|
||||
@script/docker-smoke
|
||||
|
||||
# Build Docker image tagged pixad:$(VERSION) and pixad:latest
|
||||
docker-versioned:
|
||||
docker build --build-arg VERSION=$(VERSION) -t pixad:$(VERSION) -t pixad:latest .
|
||||
|
||||
Reference in New Issue
Block a user