scripts/config.sh.ctmpl
{{- define "KEY" -}}
{{ key (printf "docker-server-configs/BB/data-dumps-config.json/%s" .) }}
{{- end -}}
#!/bin/bash
{{if service "pgbouncer-master"}}
{{with index (service "pgbouncer-master") 0}}
POSTGRES_HOST="{{.Address}}"
POSTGRES_PORT={{.Port}}
{{end}}
{{end}}
# rsync to FTP server configuration
RSYNC_FULLEXPORT_HOST="{{template "KEY" "rsync_fullexport_host"}}"
RSYNC_FULLEXPORT_PORT="{{template "KEY" "rsync_fullexport_port"}}"
RSYNC_FULLEXPORT_DIR="/home/bookbrainz/data/dumps"
RSYNC_FULLEXPORT_KEY='/home/bookbrainz/.ssh/rsync-bookbrainz-dumps'