fork 0k-charms
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.
 
 

29 lines
463 B

#!/bin/bash
set -e
URL=$(relation-get url) || exit 1
PROTO="${URL%%://*}"
ssl_enable=true
case "$PROTO" in
http)
ssl_enable=false
;;
https)
ssl_enable=true
;;
*)
err "Invalid protocol '$PROTO'."
exit 1
;;
esac
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
environment:
server_name: \"$URL\"
extra_params: \"--o:ssl.enable=false --o:ssl.termination=${ssl_enable} \"
"