Skip to content

fix(docker): recover persisted proxy routes before dependency readiness - #162

Merged
RentnerKev merged 5 commits into
mainfrom
codex/issue-158-proxy-startup
Oct 4, 2026
Merged

RentnerKev merged 5 commits into
mainfrom
codex/issue-158-proxy-startup

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Supported persisted HTTP/HTTPS proxy routes now recover after CrowdSec preparation and before PostgreSQL, Valkey or migrations can delay appliance startup. The management application still waits for its database, cache and migrations. Existing restore/bootstrap guards and safe fallback for unsupported snapshots remain in place.

The production smoke continuously probes published HTTP and CA-verified HTTPS through restart, recreation and separate explicit PostgreSQL/Valkey startup gates. It verifies real restored traffic and connected managed CrowdSec with active enforcement while the dependency and management application are unavailable. The managed credential status follows the existing API contract; a private nonempty bouncer file is also checked without reading it. Diagnostic output accepts only four fixed scenario names.

Validation:

  • All checks on this independent PR head pass, including Linux Production Smokes, CodeQL, Rust, scale and upgrade compatibility.
  • The combined final implementation passes the complete local production suite: 57 checks in 646 seconds, including all four continuous startup scenarios and the unchanged backup/restore/rollback tests.
  • 17 targeted probe/output-boundary tests, both TypeScript configurations, Oxfmt, both Oxlint profiles and 1,041 broader unit tests pass.
  • All own Docker resources were removed. Existing user databases and Valkey were untouched; migrations ran only in approved, fresh isolated test databases.

Single-container restart/recreation still interrupts its listener; this change removes waiting for unrelated dependency readiness from persisted route recovery.

Fixes #158.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: RentnerKev/RentnerProxy/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4630cd4c-6250-4442-a0e6-014fb287da1e
📥 Commits

Reviewing files that changed from the base of the PR and between d7e916d and 6ee6db1.

📒 Files selected for processing (10)
  • .github/scripts/Types/appliance-startup-smoke.types.ts
  • .github/scripts/appliance-compose-smoke.ts
  • .github/scripts/appliance-startup-smoke.ts
  • .github/scripts/production-smoke-ci.ts
  • README.md
  • docker/production/Dockerfile.dockerignore
  • docker/production/entrypoint.sh
  • docker/web/Dockerfile.dockerignore
  • web/src/tests/tooling/github/appliance-startup-smoke.test.ts
  • web/src/tests/tooling/github/production-smoke-ci.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area: docker Docker images, Compose configuration, and deployment. area: ci Continuous integration and GitHub automation. labels Oct 3, 2026
@RentnerKev RentnerKev added area: proxy Proxy host configuration and request forwarding. area: runtime Caddy and privileged controller runtime behavior. bug Something isn't working labels Oct 3, 2026
@RentnerKev
RentnerKev marked this pull request as ready for review October 3, 2026 23:51
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

🐳 RentnerProxy PR Preview

A test-only image for this pull request has been published successfully.

Images

Type Image
Moving preview for this PR ghcr.io/rentnerkev/rentnerproxy:pr-162
Exact tested build ghcr.io/rentnerkev/rentnerproxy:pr-162-23c61cd17079

Image digest: sha256:a74543d014f49c37589e71021e502905e2efd410e0692817fab06422f10f48d8

Tested and built merge commit: 23c61cd17079f245f8de6edc7309972779019ad5

Pull request head commit: 6ee6db1efb92bf93d1ca791d432c0abf59fe2500

For reproducible testing and bug reports, prefer pr-162-23c61cd17079. The pr-162 tag moves to the newest successful preview for this PR.


⚠️ Unreviewed development preview

This image contains unreviewed pull-request code. It may contain bugs, breaking changes, incomplete or incompatible migrations, configuration errors, and changes that damage data or runtime state.

Do not use this PR preview image with production data.

Before testing:

  1. Back up PostgreSQL.
  2. Back up the complete RentnerProxy controller/runtime state in /var/lib/rentnerproxy, including certificates, private keys, ACME state, active configuration, last-known-good state, and trusted CA material.
  3. Prefer a separate test database and separate Docker volumes.
  4. Use an isolated Docker Compose project and avoid production port bindings.

Docker

docker pull ghcr.io/rentnerkev/rentnerproxy:pr-162-23c61cd17079

Docker Compose

In a separate test copy of docker-compose.yml, replace the service image with:

image: ghcr.io/rentnerkev/rentnerproxy:pr-162-23c61cd17079

Then use an isolated Compose project:

docker compose --project-name rentnerproxy-pr-162 pull
docker compose --project-name rentnerproxy-pr-162 up -d

The repository Compose file binds ports 80, 81, and 443; change those bindings or stop the production stack before testing.

This preview is intended only for testing this pull request and is not a production release.

@RentnerKev
RentnerKev merged commit ce4cfad into main Oct 4, 2026
27 of 29 checks passed
@RentnerKev
RentnerKev deleted the codex/issue-158-proxy-startup branch October 4, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Continuous integration and GitHub automation. area: docker Docker images, Compose configuration, and deployment. area: proxy Proxy host configuration and request forwarding. area: runtime Caddy and privileged controller runtime behavior. bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(docker): recover persisted proxy routes before database and cache readiness

2 participants