Browse Source

new: add restart policy 'unless-stopped' to services.

hostresources
Valentin Lab 5 years ago
parent
commit
20a85958d2
  1. 5
      bin/compose-core

5
bin/compose-core

@ -2829,6 +2829,11 @@ _get_docker_compose_mixin_from_metadata_cached() {
mixins+=("volumes:"$'\n'"$volumes")
fi
type="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true
if [ "$type" != "run-once" ]; then
mixins+=("restart: unless-stopped")
fi
docker_compose=$(printf "%s" "$metadata" | shyaml get-value -y "docker-compose" 2>/dev/null) || true
if [ "$docker_compose" ]; then
mixins+=("$docker_compose")

Loading…
Cancel
Save