mirror of
https://github.com/portainer/portainer-docs.git
synced 2026-03-27 04:48:31 +07:00
GITBOOK-16: BE-12705 - Improvement on the Compose stacks that have bind mount configuration
This commit is contained in:
committed by
gitbook-bot
parent
53e0d849ee
commit
d101efa7ea
BIN
.gitbook/assets/2.40-edge-config.gif
Normal file
BIN
.gitbook/assets/2.40-edge-config.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -9,7 +9,7 @@ metaLinks:
|
||||
|
||||
When a stack deployed from a Git repository is updated, Portainer re-clones the repository if the commit has changed. This removes and recreates the repository directory on the host. If a container uses a relative path bind mount that points to files or directories inside the Git repository and that container is not recreated during the update, the bind mount can appear empty inside the container. This happens because the container is still referencing the previous filesystem path, which no longer exists after the repository is re-cloned.
|
||||
|
||||
Containers are only recreated when their Compose file or related configuration changes, unless [GitOps Updates with Force redeployment](../../../user/docker/stacks/add.md#option-3-git-repository) is enabled.
|
||||
Containers are only recreated when their Compose file or related configuration changes, unless [GitOps Updates with Force redeployment](../../../user/docker/stacks/add.md#option-3-git-repository) is enabled. If a configuration file mounted by a service changes, Portainer will restart the affected service during the GitOps update so the updated configuration is applied.
|
||||
|
||||
To ensure bind mounts are remounted correctly, [update the stack](../../../user/docker/stacks/edit.md) using **Pull and redeploy** with **Re-pull image and redeploy** enabled. This forces all containers in the stack to be recreated and remounts bind mounts against the newly cloned repository.
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ using the file defined in the Compose path and any additional compose paths defi
|
||||
|
||||
{% hint style="info" %}
|
||||
For all platforms, we do **not** force a redeployment if the image has not updated (the default behavior of each of the tools). Therefore, if Docker or Kubernetes determines the image hasn't changed for a container it will **not** redeploy that container.
|
||||
|
||||
If a configuration file mounted by a service changes, Portainer will restart the affected service during the GitOps update so the updated configuration is applied.
|
||||
{% endhint %}
|
||||
|
||||
The commit hash in the Portainer database is updated to match the newly deployed commit hash.
|
||||
|
||||
@@ -14,7 +14,7 @@ Edge Configurations are sets of files that can be pre-deployed to your Edge envi
|
||||
|
||||
From the menu under **Edge compute** select **Edge Configurations**.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/2.19-edge-configurations.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/2.40-edge-config.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Here you can see a list of your current configurations, the Edge groups they apply to, creation and update dates, as well as the progress in pushing the configuration to your Edge environments. 
|
||||
|
||||
@@ -83,3 +83,11 @@ services:
|
||||
```
|
||||
|
||||
In this example, each Edge device the stack was deployed to would mount their specific device (based on the Portainer Edge ID) folder to the `/my-device-config` folder in the container.
|
||||
|
||||
## Updating an Edge Configuration used by a stack
|
||||
|
||||
If you update an existing Edge Configuration that is referenced by an Edge Stack, the updated files will be pushed to the Edge environments the configuration applies to. Once the updated configuration is received on the Edge device, the files in the configured directory will be replaced with the new versions.
|
||||
|
||||
If the updated files are mounted by a service in an Edge Stack, the affected service will automatically restart during the next GitOps update so that the updated configuration is applied. Only services that reference the updated configuration will restart. Other services in the stack will continue running without interruption.
|
||||
|
||||
This ensures configuration updates are applied consistently across Edge devices without requiring a full stack redeployment.
|
||||
|
||||
@@ -91,7 +91,7 @@ This feature is only available in [Portainer Business Edition](https://www.porta
|
||||
Portainer supports automatically updating your Edge Stacks deployed from Git repositories. To enable this, toggle on **GitOps updates** and configure your settings.
|
||||
|
||||
{% hint style="info" %}
|
||||
For more detail on how automatic updates function under the hood, have a look at [this knowledge base article](https://portal.portainer.io/knowledge/how-do-automatic-updates-for-stacks-applications-work).
|
||||
For more detail on how automatic updates function under the hood, have a look at [this FAQ](../../../faqs/troubleshooting/stacks-deployments-and-updates/how-do-automatic-updates-for-stacks-applications-work.md).
|
||||
{% endhint %}
|
||||
|
||||
| Field/Option | Overview |
|
||||
|
||||
Reference in New Issue
Block a user