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.

18 lines
352 B

  1. #!/bin/bash
  2. set -e
  3. PASSWORD="$(relation-get password)"
  4. USER="$(relation-get user)"
  5. DBNAME="$(relation-get dbname)"
  6. config-add "\
  7. services:
  8. $MASTER_BASE_SERVICE_NAME:
  9. environment:
  10. DB_VENDOR: postgres
  11. DB_ADDR: \"$MASTER_TARGET_SERVICE_NAME\"
  12. DB_DATABASE: \"$DBNAME\"
  13. DB_PASSWORD: \"$PASSWORD\"
  14. DB_USER: \"$USER\"
  15. "