Skip to content

fix(docker): compose stack starts cold (gh_token secret + correct healthcheck)#79

Merged
fronzec merged 1 commit into
mainfrom
fix/docker-compose-cold-start
Jun 21, 2026
Merged

fix(docker): compose stack starts cold (gh_token secret + correct healthcheck)#79
fronzec merged 1 commit into
mainfrom
fix/docker-compose-cold-start

Conversation

@fronzec

@fronzec fronzec commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

Two fixes so docker compose up works on a fresh machine (backlog I1 + I2).

I1 — missing build secret. The app service builds from fr-batch-service/Dockerfile, which pulls the private batch-job-api from GitHub Packages via a BuildKit secret (--mount=type=secret,id=gh_token). The compose file declared no secret, so a cold docker compose up failed the build with a missing /run/secrets/gh_token. Now the secret is sourced from GITHUB_TOKEN, and GITHUB_ACTOR is passed as a build arg (defaulting to x-access-token).

I2 — wrong healthcheck endpoint. Both the Dockerfile HEALTHCHECK and the compose healthcheck probed /actuator/health, which returns 503 until at least one plugin is loaded — a fresh container would loop unhealthy → restart forever. Both now probe /jobs/plugins, which returns 200 as soon as the app serves and is public (no auth), matching the readiness probe already used by CI and process-compose.yaml.

Files

  • docker-compose.yml — app build.secrets + build.args, top-level secrets:, healthcheck endpoint
  • fr-batch-service/Dockerfile — HEALTHCHECK endpoint
  • RUNNING_LOCALLY.md — document the GITHUB_TOKEN export

Verification

  • docker-dry-run CI job builds the Dockerfile (validates the HEALTHCHECK + secret mount).
  • Compose YAML validated well-formed locally. /jobs/plugins confirmed public via SecurityConfig and the existing CI health-wait that hits it without credentials.

… healthcheck)

I1: the app service builds from the Dockerfile, which pulls the private
batch-job-api from GitHub Packages via a BuildKit secret (id=gh_token).
docker-compose.yml declared no secret, so `docker compose up` failed the
build cold with a missing /run/secrets/gh_token. Wire the secret from the
GITHUB_TOKEN env var and pass GITHUB_ACTOR as a build arg.

I2: both the Dockerfile HEALTHCHECK and the compose healthcheck probed
/actuator/health, which is 503 until a plugin is loaded — a fresh
container would loop unhealthy/restart forever. Probe /jobs/plugins (200
once serving, and public), matching CI and process-compose readiness.

Document the GITHUB_TOKEN requirement in RUNNING_LOCALLY.md.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@fronzec, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 19 minutes and 2 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4f80f705-3e30-499e-8d38-ec58bc8bd222

📥 Commits

Reviewing files that changed from the base of the PR and between 5ebc9d9 and a85995f.

📒 Files selected for processing (3)
  • RUNNING_LOCALLY.md
  • docker-compose.yml
  • fr-batch-service/Dockerfile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docker-compose-cold-start

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fronzec
fronzec merged commit 5c214c9 into main Jun 21, 2026
8 checks passed
@fronzec
fronzec deleted the fix/docker-compose-cold-start branch June 21, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant