This PR was created by an AI agent (OpenHands) on behalf of the user.
Makes the production pull policy configurable and documents using a locally built image without GHCR.
Review fixes
Development builds now tag ghcr.io/ashcoft/pol:${POL_VERSION:-latest}, so a pinned POL_VERSION produces the same tag production uses.
POL_PULL_POLICY is commented out in .env.example; development keeps the missing policy, while production defaults to always.
docker save and docker load use the resolved POL_VERSION and write to /tmp, outside the build context.
The restore workflow starts production with POL_PULL_POLICY=never, and the README explains setting it in .env for persistent use.
pol-image.tar.gz is excluded in .dockerignore.
Verification
docker compose resolves the same image tag in both files with POL_VERSION=1.4.0.
Development resolves pull_policy: missing; production resolves always.
.env.example resolves latest with the development missing policy.
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
Enable production deployments to run versioned local images when registry access is unavailable.
New Features:
Allow production deployments to use a locally built application image without pulling from GHCR by configuring the production pull policy.
Add documented image backup and restore steps for deployments that cannot authenticate with GHCR.
Enhancements:
Use the configured application image version consistently across development and production Compose configurations.
Documentation:
Document local-image deployment, pull-policy configuration, and image backup and restoration procedures.
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.
Tags development builds with POL_VERSION so a local image carries the tag production expects, and excludes image archives from the build context.
Documents the docker save/docker load backup path so a removed container doesn't require GHCR authentication.
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.
Confidence Score: 5/5
The PR appears safe to merge; the two existing backup-documentation issues remain non-blocking.
### Issue 1
readme.md:299-301
If `.env` contains `POL_VERSION="local"`, Compose selects `ghcr.io/ashcoft/pol:local`, but the new `grep` command keeps the quote characters. That gives `docker save` an invalid image name. The pipeline can still leave a gzip file containing no image.
Get the image name from the resolved Compose configuration instead. The Operations example has the same problem.
### Issue 2
readme.md:undefined-301
The backup now lives only in `/tmp`. If a reboot or routine cleanup clears that directory, operators lose their recovery copy and may need GHCR access again.
Save the archive outside the build directory in a persistent backup location, and use that location in both restore examples.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Allows production to use a locally built image without GHCR.
Production can run the versioned image built by development.
Operators can save and restore the production image without GHCR.