mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-27 10:05:32 +02:00
fix: adjust scaling command in backupVolume function
- Updated the backupVolume function to use the actual number of replicas when scaling services back up after a backup, improving accuracy in service management. - Enhanced command generation for application service types to ensure proper restoration of service states.
This commit is contained in:
@@ -32,8 +32,9 @@ const backupVolume = async (
|
||||
if (serviceType === "application") {
|
||||
return `
|
||||
docker service scale ${volumeBackup.application?.appName}=0
|
||||
ACTUAL_REPLICAS=$(docker service inspect ${volumeBackup.application?.appName} --format "{{.Spec.Mode.Replicated.Replicas}}")
|
||||
${baseCommand}
|
||||
docker service scale ${volumeBackup.application?.appName}=1
|
||||
docker service scale ${volumeBackup.application?.appName}=$ACTUAL_REPLICAS
|
||||
`;
|
||||
}
|
||||
if (serviceType === "compose") {
|
||||
|
||||
Reference in New Issue
Block a user