brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: turn on Re-pull image in a Portainer Git stack so updates really update

Git
~/tips/tip-portainer-git-repull-image

cat ~/tips/tip-portainer-git-repull-image.md

Makes a Git-based Portainer stack pull fresh images whenever it redeploys.

A Git stack in Portainer can update itself. The setting people overlook is the one that decides whether it pulls a newer image too.

When you add a stack from a Git repository, switch on GitOps updates. You choose Polling, which checks at a fetch interval you set, or a Webhook URL you call from your repository. Then look at Re-pull image. The docs say it pulls the latest image on every update, like --pull=always in Compose.

Without it, a new commit redeploys the stack, but a moving tag like latest may stay on the old image that is already on the host. That one is easy to miss, because the stack looks like it updated.

There is also Force redeployment. It redeploys at each interval, even when Git has no new commits, and overwrites local changes. I would leave that off unless you want Git to always win.

Caveat: a redeploy can interrupt the service while the container restarts, so pick an interval that suits the app.

If you use the webhook instead of polling, the same toggle applies. Copy the URL into your repository’s automation and the stack follows your pushes. I prefer polling for a home server, because it needs no open port for the Git host to reach, but that depends on your network.

Further reading: Add a stack, Edit a stack, On this site: Detach from Git in Portainer only downloads the main compose file, On this site: migrating a stack in Portainer does not move its volumes

More Git tips git show-branch main feature git log --stat -5 git merge --no-ff feature -m "Merge feature" git merge --squash feature git merge --abort All Git tips (144) All topics

Link