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.
 
 

25 lines
515 B

#!/bin/bash
set -e
PEERTUBE_CONFIG_DIR=/etc/peertube
HOST_CONFIG_DIR=$SERVICE_CONFIGSTORE/$PEERTUBE_CONFIG_DIR
PASSWORD="$(relation-get password)"
USER="$(relation-get user)"
DBNAME="$(relation-get dbname)"
cat <<EOF >> "$HOST_CONFIG_DIR/local.yaml"
database:
hostname: '$TARGET_SERVICE_NAME'
## We had to patch peertube to have a direct dbname (doh!)
dbname: '$DBNAME'
port: 5432
username: '$USER'
password: '$PASSWORD'
EOF
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."