The setup.sh script is the core of all the cloud based installation options. Regarding an image-based installation, you don't have to dive into the details of this script, but if you want to install Redash manually (or are just curious about the internals), it's better to take a quick look at it.
In case you intend to use the setup.sh script for production environment:
For small scale deployments you can use it as is.
But for large scale deployments where Redash is mission critical, and needs to be Highly Available, it's recommend that you set up a separate server for PostgreSQL and Redis, as well as set up at least 2 servers for Redash for redundancy.
The number of celery workers can be modified based on your usage patterns.
Let's break the script into parts while going over it.
At first, we set Redash base installation path, and start defining helper functions.
The following is the definition of helper function, which installs the docker compose as well as surrounding components:
The following is a helper function that creates the directories for Redash installation:
create_directories() {
if [[ ! -e $REDASH_BASE_PATH ]]; then
sudo mkdir -p $REDASH_BASE_PATH
sudo chown $USER:$USER $REDASH_BASE_PATH
fi
if [[ ! -e $REDASH_BASE_PATH/postgres-data ]]; then
mkdir $REDASH_BASE_PATH/postgres-data
fi
}
The following is a helper function that creates and persists Environment Variables used in Redash: