#94

feat: allow a local production image without GHCR

Openashcoftwants to merge intofrom
  • Make the production pull policy configurable with POL_PULL_POLICY (default always, never for a locally built image).
  • Document the local-image path and the docker save/load backup so a removed container does not require GHCR authentication.

Summary by Sourcery

Support production deployments with configurable image pulling so locally built images can be used without GHCR authentication.

New Features:

  • Allow production deployments to reuse locally built images without requiring GHCR access.
  • Document saving and restoring the production image for offline recovery.

Enhancements:

  • Document the configurable production image pull policy and its supported values.

Documentation:

  • Add instructions for local-image production deployments and Docker image backup and restoration.

This change is 


Summary by cubic

Makes the production pull policy configurable so deployments can run a locally built image instead of pulling from GHCR.

  • Adds POL_PULL_POLICY (always by default, matching the previous behavior; never uses a locally built image) and documents it in .env.example, docker-compose.prod.yml, and the readme.
  • Documents the docker save/docker load backup path so a removed container doesn't require GHCR authentication.

Written for commit 416b46508a47d8c4e4652ea8899f1853708749d1. Summary will update on new commits.

Confidence Score: 4/5

Fix the image-tag mismatch in the local-build and backup instructions before merging.

Findings

  1.  Pinned image is not built ▶
Fix with agent prompt
### Issue 1
readme.md:289-290
If `.env` pins `POL_VERSION`, these steps build `latest` but then ask production to use the pinned tag with pulling disabled. If that tag is missing locally, production cannot start. If it already exists, production uses that image instead of the new build. The backup commands also save `latest`, not the selected production tag.

Build, run, and save the same tag, or explicitly require `POL_VERSION=latest` for this path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Allows production to reuse a local image without pulling from GHCR.

  • Production can start the app from a local image when GHCR is unavailable.

Reviews (1) · Last reviewed commit: "feat: allow a local production image wit..." · Reviewed by Greptile

Summary by CodeRabbit

  • New Features

    • Production deployments can now configure whether Docker pulls the image or uses a locally built one. The default behavior is to pull the latest image.
    • Added instructions for saving and restoring images, along with configuration guidance.
  • Documentation

    • Documented the image pull setting and its available options.

Activity

35
sourcery-ai[bot]2h ago

Sorry @ashcoft, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 10 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

snyk-io[bot]2h ago

:white_check_mark: Snyk checks have passed. No issues have been found so far.

StatusScan Engine Critical High Medium LowTotal (0)
:white_check_mark:Open Source Security0000 0 issues

:computer: Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

sourcery-ai[bot]2h ago

Reviewer's Guide

Configuration

Make development and production use the same configurable image tag, allow production pull behavior to be overridden, and exclude image archives from the build context.

  • .dockerignore L16
  • docker-compose.prod.yml L6
  • docker-compose.yaml L3

Documentation

Document the configurable production pull policy, the local-image build and restore workflow, and the matching image-backup commands and settings.

  • readme.md L282-313, L346, L404-410

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it. You can also reply to a review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment @sourcery-ai summary on the pull request to (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codacy-production[bot]2h ago

Up to standards :white_check_mark:

🟢 Issues 0 issues

Results: 0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.

coderabbitai[bot]2h ago

Walkthrough

The production Compose service now reads its image pull policy from POL_PULL_POLICY, defaulting to always. The example environment file and README document the setting, local image use, and image save and restore commands.

Changes: Production image pull policy

Layer / File(s)Summary
Configure and document image pull policy
docker-compose.prod.yml, .env.example, readme.md
The production service uses POL_PULL_POLICY, defaulting to always. The README and example environment file document the always and never options, local image commands, and image save and restore commands.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

  • ashcoft/pol#88: Introduces the production image and Compose deployment that this change extends with a local-image option.
  • ashcoft/pol#92: Adds the production Compose file and its fixed pull policy, which this change makes configurable.

Suggested reviewers: openhands-agent

Merge Risk: Low · up to 416b4

Production keeps its always-pull default, but the example .env would make development runs pull from GHCR, which can replace a locally built image. The new local-image and backup instructions also fail for pinned release tags and omit the no-pull setting when restoring. Fix these small documentation and example issues before or shortly after merge.

Pre-merge checks: 4

Check nameStatusExplanation
Title checkThe title "feat: allow a local production image without GHCR" matches the main change. The PR adds the POL_PULL_POLICY variable to docker-compose.prod.yml, with a default of always and a value of neve…
Linked Issues checkCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkCheck skipped because no linked issues were found for this pull request.
Description CheckCheck skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "feat: allow a local production image without GHCR" matches the main change. The PR adds the POL_PULL_POLICY variable to docker-compose.prod.yml, with a default of always and a value of never for a locally built image. The .env.example and readme.md changes document this workflow, including docker save and docker load for backup and restore. The title names the primary objective, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · 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

mergify[bot]2h ago

Queue requested — the merge queue status continues in this comment ↓.

kilo-code-bot[bot]reviewed2h ago
kilo-code-bot[bot]reviewed2h ago
kilo-code-bot[bot]2h ago

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • .dockerignore - 0 issues
  • .env.example - 0 issues
  • docker-compose.yaml - 0 issues
  • readme.md - 0 issues

All findings from the previous review have been resolved in commit 862f7605ffc576f62f6da81f285b3ef972fb7f09. The local-image workflow now consistently uses POL_VERSION, backups write outside the build context, and .dockerignore excludes pol-image.tar.gz.

Previous Review Summary (commit 416b465)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 416b465)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

SeverityCount
CRITICAL0
WARNING1
SUGGESTION0
Issue Details (click to expand)

WARNING

FileLineIssue
readme.md290Local-image workflow hardcodes latest while prod compose and docs assume a pinnable POL_VERSION; breaks when POL_VERSION is pinned.
Files Reviewed (3 files)
  • .env.example - 0 issues
  • docker-compose.prod.yml - 0 issues
  • readme.md - 1 issue

Fix these issues in Kilo Cloud


Reviewed by free · Input: 75.3K · Output: 8.2K · Cached: 117.1K

greptile-apps[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]2h ago

Devin Review found 2 new potential issues.

3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

greptile-apps[bot]reviewed2h ago
greptile-apps[bot]reviewed2h ago
greptile-apps[bot]reviewed2h ago
mergify[bot]2h ago

✅ Merged into main as 9b3fad4 at 05:42 UTC

Less than a minute in the queue, less than a minute of it CI.

So far

  • ✅ Entered the queue Sun 22 Nov, 05:42 · rule default · triggered by @ashcoft with the merge queue checkbox
  • ✅ Passed · draft #96
  • ✅ Merged 05:42 · 9b3fad4

Times in UTC · dashboard · how the merge queue works