|
@ -597,7 +597,16 @@ compose:get_url() { |
|
|
container_id=$(compose:service:container_one "${project_name}" "${service}") || return 1 |
|
|
container_id=$(compose:service:container_one "${project_name}" "${service}") || return 1 |
|
|
network_ip=$(docker:container:network_ip_one "${container_id}") || return 1 |
|
|
network_ip=$(docker:container:network_ip_one "${container_id}") || return 1 |
|
|
IFS=":" read -r network ip <<<"$network_ip" |
|
|
IFS=":" read -r network ip <<<"$network_ip" |
|
|
echo "http://$ip" |
|
|
|
|
|
|
|
|
tcp_port= |
|
|
|
|
|
for port in $(docker:exposed_ports "$container_id"); do |
|
|
|
|
|
IFS="/" read port type <<<"$port" |
|
|
|
|
|
[ "$type" == "tcp" ] || continue |
|
|
|
|
|
tcp_port="$port" |
|
|
|
|
|
break |
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
echo -n "http://$ip" |
|
|
|
|
|
[ -n "$tcp_port" ] && echo ":$tcp_port" |
|
|
fi || { |
|
|
fi || { |
|
|
err "Failed querying ${service} to frontend relation to get url." |
|
|
err "Failed querying ${service} to frontend relation to get url." |
|
|
return 1 |
|
|
return 1 |
|
|