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.

24 lines
499 B

  1. #!/bin/bash
  2. ## XXXvlab: this hook should go into a generic odoo image
  3. ## XXXvlab: should get location of code
  4. CONFIG=$SERVICE_CONFIGSTORE/etc/odoo-server.conf
  5. . lib/common
  6. set -e
  7. PASSWORD="$(relation-get password)"
  8. USER="$(relation-get user)"
  9. DBNAME="$(relation-get dbname)"
  10. config-add "\
  11. services:
  12. $MASTER_BASE_SERVICE_NAME:
  13. environment:
  14. CMD_DB_URL: postgres://$USER:$PASSWORD@$TARGET_SERVICE_NAME/$DBNAME
  15. "
  16. info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."