fix: restart containers on-failure instead of always

This commit is contained in:
Andras Bacsai
2022-08-17 13:59:23 +02:00
parent 0239be69e6
commit 8bec5550cf
4 changed files with 60 additions and 68 deletions

View File

@@ -1813,4 +1813,20 @@ export function persistentVolumes(id, persistentStorage, config) {
...composeVolumes
) || {}
return { volumes, volumeMounts }
}
export function defaultComposeConfiguration(network: string): any {
return {
networks: [network],
restart: 'on-failure',
deploy: {
restart_policy: {
condition: 'on-failure',
delay: '5s',
max_attempts: 10,
window: '120s'
}
}
}
}