Merge pull request #9131 from dokku/fix-source-image-on-failed-deploy
Keep the git source-image property in sync and harden the deploy lock
This commit is contained in:
13 files changed
+666
-51
No files matched your search
@@ -170,6 +170,8 @@ By default, when running `git:sync` with a git branch reference, Dokku will auto
|
||||
dokku git:sync --skip-deploy-branch node-js-app https://github.com/heroku/node-js-getting-started.git main
|
||||
```
|
||||
|
||||
The `git:sync` command holds the app's deploy lock while fetching, and will fail if a deploy is already in progress. When the fetched code changes the repository or a build is triggered, the `source-image` property set by [image deploys](/docs/deployment/methods/image.md) is cleared. As the synced code is kept even when a build fails, the property is not restored on build failure.
|
||||
|
||||
### Initializing from private repositories
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
||||
@@ -59,6 +59,8 @@ dokku git:from-image --build-dir path/to/build node-js-app domy-registrykku/node
|
||||
|
||||
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
|
||||
The image used for a `git:from-image` or `git:load-image` deploy is stored in the `source-image` git property, which can be viewed via `dokku git:report node-js-app --git-source-image`. This property is only changed while the app's deploy lock is held. If the deploy fails, the deploy branch is rolled back and the property is restored to its previous value, so it always refers to the image the repository was last successfully deployed from. Deploying via other methods - such as `git push`, `git:from-archive`, or `git:sync` - clears the property.
|
||||
|
||||
## Initializing an app repository from a remote image without a registry
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
||||
Reference in new issue
Block a user