Merge pull request #2290 from dokku/1734-restart-policies

Implement restart-policy handling
This commit is contained in:
Jose Diaz-Gonzalez
2016-07-30 15:10:37 -04:00
committed by GitHub
10 changed files with 178 additions and 21 deletions

View File

@@ -165,3 +165,15 @@ ps_scale() {
release_and_deploy "$APP" "$IMAGE_TAG"
fi
}
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"
}
get_restart_policies() {
declare desc="strips docker options and prints restart policies"
local -r phase_file_path=$1
get_raw_restart_policies "$phase_file_path" | sed -e 's/^--restart=//g'
}