Redash with Coolify
In this guide, we’ll walk through setting up Redash using Coolify, a platform that simplifies the deployment of containerized applications. Redash is a powerful tool for querying databases and visualizing data, making it great for analytics. Coolify will help you run Redash in a containerized environment using Docker Compose.
Docker Compose File
We’ll start with the docker-compose.yml
file for Redash, which includes Redash services, Redis, and Postgres (with automatic upgrades).
Explanation:
- Redash services: Includes server, scheduler, scheduled_worker, adhoc_worker, and worker with specific roles for handling queries, scheduling, and periodic tasks.
- Redis: A lightweight and fast in-memory data structure store, required for Redash.
- Postgres: The PostgreSQL database service that Redash will use to store data. This setup uses the pgautoupgrade image for automated upgrades.
- Volumes: Data from Postgres is persisted in the /opt/redash/postgres-data directory.
Environment Variables
Next, you need to define the environment variables for Redash. Some sensitive fields (like secrets) should be filled with random values, which you can generate with tools like pwgen
.
Filling the Variables:
REDASH_COOKIE_SECRET
andREDASH_SECRET_KEY
: These should be securely generated random strings. You can generate them with pwgen -1s 32.POSTGRES_PASSWORD
: Set a password for your PostgreSQL database.REDASH_DATABASE_URL
: Replace POSTGRES_PASSWORD with your chosen PostgreSQL password from the previous step.
Make sure to update these values in your Coolify environment settings.
Initialize the database
After setting up the containers and services, you need to create the necessary database tables for Redash.
- Go to Execute Command in Coolify’s interface.
- Select the container labeled server-
<someid>
. - Enter the following command to create the database tables:
This will set up the required tables and make the Redash instance functional.
Configure the server
Now, let’s finalize the server configuration:
- Navigate to the Service Stack section in Coolify.
- Under Services, select Server.
- In the Settings tab, find the Domains field and enter a domain name for your Redash instance. This will be the public URL where your Redash instance will be accessible.
Done!
That’s it! You have successfully deployed Redash using Coolify. You can now access Redash via the domain you configured, start connecting databases, and run your queries. If you run into any issues or need additional configurations, check the Redash documentation for further guidance. Done