|
|
|
@ -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"
|
|
|
|
|