You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.6 KiB

# Check if Docker-Compose is not installed
if [ -z "$(which docker-compose)" ]; then
echo "Docker-Compose is not installed. Please install it first from"
exit 1
# Docker-Compose version check, to prevent "Unsupported configuration option"
COMPOSE_VERSION=$(docker-compose version --short 2>/dev/null || docker compose version --short 2>/dev/null)
if [[ $(printf '%s\n' "$REQUIRED_COMPOSE_VERSION" "$COMPOSE_VERSION" | sort -V | head -n1) != $REQUIRED_COMPOSE_VERSION ]]; then
echo "Your docker-compose version of $COMPOSE_VERSION is too old. Please upgrade to $REQUIRED_COMPOSE_VERSION or higher."
echo "See for installation instructions."
exit 1
echo "Enter a hostname for the Frontend (eg:" && read -r frontend
echo "Enter a hostname for the Backend (eg:" && read -r backend
echo "Enter a hostname for the Proxy (eg:" && read -r proxy
echo "Enter the reverse proxy you would like to use (either caddy or nginx):" && read -r reverseproxy
rm -rf config/
rm -f docker-compose.yml
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/*
# The openj9 image does not support aarch64
if [[ "$(uname -m)" == "aarch64" ]]; then
sed -i "s/piped:latest/piped:hotspot/g" config/*
mv config/docker-compose.$reverseproxy.yml docker-compose.yml