compose: declare the healthcheck that the image already has
All checks were successful
Tests / test (push) Successful in 9m55s

asxpio-ops moves to NixOS, where containers run under Podman. Podman
ignores the HEALTHCHECK of OCI-format images, which is what kaniko
pushes, so the container would never report "healthy" and the deploy,
which waits for exactly that, would time out.

Copy the image's healthcheck into the compose file. Under Docker,
which reads it from the image today, nothing changes.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-11-17 07:53:05 +04:00
commit 8592fca4ea
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -4,6 +4,14 @@ services:
build: .
image: datacenterbingo:latest
container_name: datacenterbingo
# Same as the image HEALTHCHECK. Podman ignores HEALTHCHECK in OCI-format
# images (what kaniko pushes), and the deploy waits for "healthy".
healthcheck:
test: ["CMD-SHELL","ruby -rnet/http -e 'port = ENV.fetch(\"PUMA_PORT\", \"3000\"); exit(Net::HTTP.get_response(URI(\"http://127.0.0.1:#{port}/healthz\")).code == \"200\" ? 0 : 1)'"]
interval: 30s
timeout: 5s
start_period: 20s
retries: 3
restart: unless-stopped
env_file: .env
networks: