made webhook domain variable
This commit is contained in:
parent
ea71bc727c
commit
0210037e90
@ -5,7 +5,7 @@ services:
|
|||||||
image: cryptkiddie2/webhook-docker:latest
|
image: cryptkiddie2/webhook-docker:latest
|
||||||
restart: always
|
restart: always
|
||||||
labels:
|
labels:
|
||||||
- traefik.frontend.rule=Host:site.webhook.nachtigall.chaospott.de
|
- traefik.frontend.rule=Host:${WEBHOOK_DOMAIN}
|
||||||
- traefik.port=9000
|
- traefik.port=9000
|
||||||
- traefik.docker.network=web
|
- traefik.docker.network=web
|
||||||
networks:
|
networks:
|
||||||
|
10
init.sh
10
init.sh
@ -5,9 +5,11 @@ exe() {
|
|||||||
}
|
}
|
||||||
SITE_REPO="https://git.chaospott.de/chaospott/site.git"
|
SITE_REPO="https://git.chaospott.de/chaospott/site.git"
|
||||||
echo "Where should the site store all volumes?"
|
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 ID (just make something up):" ENDPOINT_ID
|
||||||
read -p "Hook endpoint Password:" ENDPOINT_PW
|
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"
|
echo "Creating volumes structure"
|
||||||
exe mkdir $VOLUMES_PATH
|
exe mkdir $VOLUMES_PATH
|
||||||
exe git clone $SITE_REPO $VOLUMES_PATH/repo
|
exe git clone $SITE_REPO $VOLUMES_PATH/repo
|
||||||
@ -23,6 +25,8 @@ echo """[
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]""" > $VOLUMES_PATH/webhook/hooks.json
|
]""" > $VOLUMES_PATH/webhook/hooks.json
|
||||||
VOLUMES_PATH_SANITIZED=$(echo $VOLUMES_PATH | sed 's/\/$//g')
|
echo """DATA_ROOT=$VOLUMES_PATH
|
||||||
echo "DATA_ROOT=$VOLUMES_PATH_SANITIZED" > .env
|
WEBHOOK_DOMAIN=$HOOK_DOMAIN""" > .env
|
||||||
exe chmod 777 $VOLUMES_PATH -Rc
|
exe chmod 777 $VOLUMES_PATH -Rc
|
||||||
|
echo "configure your git with the following hook URL:"
|
||||||
|
echo "https://$HOOK_DOMAIN/hooks/$ENDPOINT_ID"
|
||||||
|
Loading…
Reference in New Issue
Block a user