diff --git a/bin/compose-core b/bin/compose-core index a45689d..3d0f2f9 100755 --- a/bin/compose-core +++ b/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")