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.

21 lines
413 B

  1. #!/bin/bash
  2. . lib/common
  3. set -e
  4. PASSWORD="$(relation-get password)"
  5. USER="$(relation-get user)"
  6. DBNAME="$(relation-get dbname)"
  7. config-add "\
  8. services:
  9. $MASTER_BASE_SERVICE_NAME:
  10. environment:
  11. POSTGRES_HOST: $MASTER_TARGET_SERVICE_NAME
  12. POSTGRES_DB: $DBNAME
  13. POSTGRES_PASSWORD: $PASSWORD
  14. POSTGRES_USER: $USER
  15. "
  16. info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."