echo'Checking if required environment variables are set and valid...'
if[ -z "$DATABASE_URL"];then
echo"DATABASE_URL is not set. Exiting..."
exit1
fi
if[${#ENCRYPTION_SECRET} -ne 32];then
echo"ENCRYPTION_SECRET is not 32 characters long. Exiting... (To generate a valid secret: https://docs.typebot.io/self-hosting/docker#2-add-the-required-configuration)"
exit1
fi
if[ -z "$NEXTAUTH_URL"];then
echo"NEXTAUTH_URL is not set. Exiting..."
exit1
fi
if[ -z "$NEXT_PUBLIC_VIEWER_URL"];then
echo"NEXT_PUBLIC_VIEWER_URL is not set. Exiting..."