mirror of
https://codeberg.org/Hyperpipe/Docker
synced 2024-12-06 19:16:44 +01:00
27 lines
871 B
Bash
27 lines
871 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
printf "\nEnter hostname for Proxy (Same as the one used for Piped): " && read -r proxy
|
|
|
|
printf '\nFetching List of Hostnames for Backends (Hyperpipe) \n\n'
|
|
curl -s "https://hyperpipe.codeberg.page/api/backend.json" | jq '.[].api_url|ltrimstr("https://")'
|
|
|
|
printf "\nEnter hostname for the default hyperpipe backend to be used: " && read -r backend
|
|
|
|
printf '\nFetching List of Hostnames for Backends (Piped) \n\n'
|
|
curl -s "https://piped-instances.kavin.rocks" | jq '.[].api_url|ltrimstr("https://")'
|
|
|
|
printf "\nEnter hostname for the default piped backend to be used: " && read -r piped
|
|
|
|
rm -f "*/docker-compose.yml"
|
|
|
|
cp docker-compose.template.yml docker-compose.yml
|
|
|
|
sed -i "s/hyperpipe-proxy.onrender.com/$proxy/g" docker-compose.yml
|
|
|
|
sed -i "s/PIPED/$piped/g" docker-compose.yml
|
|
|
|
sed -i "s/BACKEND/$backend/g" docker-compose.yml
|
|
|
|
printf '\nDone!\n' |