Implement restart-policy handling. Closes #1734
Applications without a restart-policy will have their policies set to `on-failure:10`. Users can completely unset the restart-policy using the `docker-options` plugin, though this will be equivalent to setting it explicitly to `no`. Restart policies must be explicitly set, and the following are all valid: - no - unless-stopped - always - on-failure - on-failure:NUMBER
This commit is contained in:
@@ -165,3 +165,15 @@ ps_scale() {
|
||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||
fi
|
||||
}
|
||||
|
||||
get_restart_policies() {
|
||||
declare desc="strips docker options and prints restart policies"
|
||||
local -r phase_file_path=$1
|
||||
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' -e 's/^--restart=/ /' < "$phase_file_path"
|
||||
}
|
||||
|
||||
get_raw_restart_policies() {
|
||||
declare desc="strips docker options and prints raw restart policies"
|
||||
local -r phase_file_path=$1
|
||||
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' < "$phase_file_path"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user