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
476 B

  1. #!/bin/bash
  2. set -e
  3. . lib/common
  4. DOMAIN=$(relation-get domain) || exit 1
  5. ## These are mainly to setup the correct web-hook
  6. if [ "$MASTER_BASE_SERVICE_NAME" == "$DOMAIN" ]; then
  7. ## This is because the IP will be the docker container version
  8. PROTO="http"
  9. else
  10. URL="$(relation-get url)" || exit 1
  11. PROTO="${URL%%://*}"
  12. fi
  13. config-add "\
  14. services:
  15. $MASTER_BASE_SERVICE_NAME:
  16. environment:
  17. DRONE_SERVER_HOST: $DOMAIN
  18. DRONE_SERVER_PROTO: $PROTO
  19. "