Browse Source

new: ``run-once`` service should not be linked as dependencies to proper ``service``.

This will prevent ``run-once`` service to be ran by ``compose up`` if linked as a
dependency to another service.
test
Valentin Lab 6 years ago
parent
commit
ad2a6232fd
  1. 2
      bin/compose

2
bin/compose

@ -797,6 +797,8 @@ get_docker_compose_links() {
while read-0 _relation_name target_service _relation_config tech_dep; do while read-0 _relation_name target_service _relation_config tech_dep; do
master_target_service="$(get_top_master_service_for_service "$target_service")" || return 1 master_target_service="$(get_top_master_service_for_service "$target_service")" || return 1
[ "$master_service" == "$master_target_service" ] && continue [ "$master_service" == "$master_target_service" ] && continue
type="$(get_service_type "$target_service")" || return 1
[ "$type" == "run-once" ] && continue
if [ "$tech_dep" == "reversed" ]; then if [ "$tech_dep" == "reversed" ]; then
deps+=("$(echo -en "$master_target_service:\n links:\n - $master_service")") deps+=("$(echo -en "$master_target_service:\n links:\n - $master_service")")
elif [ "$tech_dep" == "True" ]; then elif [ "$tech_dep" == "True" ]; then

Loading…
Cancel
Save