2021-12-01 04:27:34 +00:00
|
|
|
# Check if Docker-Compose is not installed
|
|
|
|
if [ -z "$(which docker-compose)" ]; then
|
|
|
|
echo "Docker-Compose is not installed. Please install it first from https://docs.docker.com/compose/install/#install-compose."
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-08-25 07:51:41 +00:00
|
|
|
|
2021-12-01 04:27:34 +00:00
|
|
|
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):" && read -r frontend
|
|
|
|
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):" && read -r backend
|
|
|
|
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):" && read -r proxy
|
|
|
|
echo "Enter the reverse proxy you would like to use (either caddy or nginx):" && read -r reverseproxy
|
2021-09-25 13:44:58 +00:00
|
|
|
|
2021-08-25 07:51:41 +00:00
|
|
|
rm -rf config/
|
2021-09-25 13:44:58 +00:00
|
|
|
rm -f docker-compose.yml
|
2021-08-25 07:51:41 +00:00
|
|
|
|
|
|
|
cp -r template/ config/
|
|
|
|
|
|
|
|
sed -i "s/FRONTEND_HOSTNAME/$frontend/g" config/*
|
|
|
|
sed -i "s/BACKEND_HOSTNAME/$backend/g" config/*
|
|
|
|
sed -i "s/PROXY_HOSTNAME/$proxy/g" config/*
|
2021-08-25 11:51:03 +00:00
|
|
|
|
2021-12-01 04:27:34 +00:00
|
|
|
# The openj9 image does not support aarch64
|
2021-12-01 03:31:03 +00:00
|
|
|
if [[ "$(uname -m)" == "aarch64" ]]; then
|
|
|
|
sed -i "s/piped:latest/piped:hotspot/g" config/*
|
|
|
|
fi
|
|
|
|
|
2021-09-25 13:44:58 +00:00
|
|
|
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
|