fix: automatically clear the git source-image property when changing deployment methodologies
This ensures users don't have issues with cached state in regards to files pulled from the repo/image. Also add missing docs for deploy-source-set trigger. Closes #5963
This commit is contained in:
@@ -160,19 +160,6 @@ dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "
|
||||
|
||||
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
|
||||
|
||||
Building an app from an image will result in the following files being extracted from the source image (with all custom paths specified for each file being respected):
|
||||
|
||||
- `app.json`
|
||||
- `nginx.conf.sigil`
|
||||
- `Procfile`
|
||||
|
||||
In the case where the repository is later modified to manually add any of the above files and deployed via `git push`, the files will still be extracted from the initial source image. To avoid this, please clear the `source-image` git property. It will be set back to the original source image on any subsequent `git:from-image` calls.
|
||||
|
||||
```shell
|
||||
# sets an empty value
|
||||
dokku git:set node-js-app source-image
|
||||
```
|
||||
|
||||
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||
|
||||
```shell
|
||||
@@ -248,19 +235,6 @@ The `git:load-image` command can optionally take a git `user.name` and `user.ema
|
||||
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
Building an app from an image will result in the following files being extracted from the source image (with all custom paths specified for each file being respected):
|
||||
|
||||
- `app.json`
|
||||
- `nginx.conf.sigil`
|
||||
- `Procfile`
|
||||
|
||||
In the case where the repository is later modified to manually add any of the above files and deployed via `git push`, the files will still be extracted from the initial source image. To avoid this, please clear the `source-image` git property. It will be set back to the original source image on any subsequent `git:load-image` calls.
|
||||
|
||||
```shell
|
||||
# sets an empty value
|
||||
dokku git:set node-js-app source-image
|
||||
```
|
||||
|
||||
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user