Files
elabore-charms/zato/hooks/web_proxy-relation-joined

23 lines
578 B
Bash
Executable File

#!/bin/bash
. lib/common
DOMAIN=$(relation-get domain) || exit 1
CUSTOM_CREATE_LB_PATH="/opt/zato/3.2.0/code/zato-cli/src/zato/cli/create_lb.py"
set -e
merge_crt_letsencrypt "$DOMAIN"
# adding custom config file to handle https in load_balancer with letsencrypt-fullchain certificate
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
volumes:
- $BASE_CHARM_PATH/resources/$CUSTOM_CREATE_LB_PATH:$CUSTOM_CREATE_LB_PATH
- $DEST_LETSENCRYPT_FULLCHAIN:/opt/zato/letsencrypt-fullchain.pem
"
info "Configured $SERVICE_NAME load_balancer with HTTPS support."