You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
set -e
# if ! nextcloud_domain=$(relation:get "$MASTER_TARGET_SERVICE_NAME":web-proxy domain) || [ -z "$nextcloud_domain" ]; then # ## No domain, probably no web-proxy then.
# container=$(get_running_containers_for_service "$MASTER_TARGET_SERVICE_NAME" | head -n 1) # container_network_ip=$(get_docker_ip "$container") # container_ip=${container_network_ip#*:}
# nextcloud_domain="${container_ip}:80" # fi
if ! nextcloud_app_service=$(service:traverse "$MASTER_BASE_SERVICE_NAME":nextcloud-app); then err "Couldn't find service for"\ "${DARKYELLOW}$MASTER_BASE_SERVICE_NAME${NORMAL}--${DARKCYAN}nextcloud-app${NORMAL}--> ?" exit 1 fi
if ! collabora_domain=$(relation:get "$MASTER_BASE_SERVICE_NAME":web-proxy url) || [ -z "$collabora_domain" ]; then ## No domain, probably no web-proxy then.
# container=$(get_running_containers_for_service "$MASTER_BASE_SERVICE_NAME" | head -n 1) # container_network_ip=$(get_docker_ip "$container") # container_ip=${container_network_ip#*:}
collabora_domain="$SERVICE_NAME:9980" fi
info "collabora_domain: '$collabora_domain'"
if ! get_healthy_container_ip_for_service "$SERVICE_NAME" 9980; then exit 17 fi
## XXXvlab: we really need to have a state based cache thingy, because ## setting the same password each time is really time consumming. compose --no-relations --no-init \ occ "$nextcloud_app_service" \ app:install richdocuments \; \ config:app:set --value="${collabora_domain}" richdocuments wopi_url \; \ richdocuments:activate-config
# nextcloud_domain="${nextcloud_domain//./\\.}"
# config-add "\ # services: # $MASTER_BASE_SERVICE_NAME: # environment: # domain: \"${nextcloud_domain}\" # "
|