diff --git a/docker-compose.yml b/docker-compose.yml index 48c6d2f..47a32d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: image: cryptkiddie2/webhook-docker:latest restart: always labels: - - traefik.frontend.rule=Host:site.webhook.nachtigall.chaospott.de + - traefik.frontend.rule=Host:${WEBHOOK_DOMAIN} - traefik.port=9000 - traefik.docker.network=web networks: diff --git a/init.sh b/init.sh index ffa3fd1..407e35f 100755 --- a/init.sh +++ b/init.sh @@ -5,9 +5,11 @@ exe() { } SITE_REPO="https://git.chaospott.de/chaospott/site.git" echo "Where should the site store all volumes?" -read -p "PATH: " VOLUMES_PATH +read -p "PATH: " VOLUMES_PATH_RAW read -p "Hook endpoint ID (just make something up):" ENDPOINT_ID read -p "Hook endpoint Password:" ENDPOINT_PW +read -p "Hook Domain (NOT site domain):" HOOK_DOMAIN +VOLUMES_PATH=$(echo $VOLUMES_PATH_RAW | sed 's/\/$//g') echo "Creating volumes structure" exe mkdir $VOLUMES_PATH exe git clone $SITE_REPO $VOLUMES_PATH/repo @@ -23,6 +25,8 @@ echo """[ } } ]""" > $VOLUMES_PATH/webhook/hooks.json -VOLUMES_PATH_SANITIZED=$(echo $VOLUMES_PATH | sed 's/\/$//g') -echo "DATA_ROOT=$VOLUMES_PATH_SANITIZED" > .env +echo """DATA_ROOT=$VOLUMES_PATH +WEBHOOK_DOMAIN=$HOOK_DOMAIN""" > .env exe chmod 777 $VOLUMES_PATH -Rc +echo "configure your git with the following hook URL:" +echo "https://$HOOK_DOMAIN/hooks/$ENDPOINT_ID"