Learn how to use Redash to query.
Redash Features
Schedule refreshes: Automatically update your charts and dashboards with regular intervals you define
Alerts: Define conditions and be alerted instantly when your data changes
Query editor: Can use with SQL and NoSQL queries
REST API: Can use with SQL and NoSQL queries
Dashboards: Can share with team members or publicly
How to build a Redash App with docker file?
Setup
- Init directory
mkdir redash && cd redash/
- Create env file
touch env
- Copy the following content and paste to env file
PYTHONUNBUFFERED=0 REDASH_LOG_LEVEL=INFO REDASH_REDIS_URL=redis://redis:6379/0 #Can be any value REDASH_COOKIE_SECRET=xxxx #Used for session encryption #Can be any value REDASH_SECRET_KEY=xxxx #Used for database field value encryption, such as data source account password POSTGRES_PASSWORD=password REDASH_DATABASE_URL=postgresql://postgres:password@postgres/postgres #Enable custom code REDASH_FEATURE_ALLOW_CUSTOM_JS_VISUALIZATIONS="true" #Open a special data source REDASH_ADDITIONAL_QUERY_RUNNERS="redash.query_runner.python" # REDASH_ADDITIONAL_QUERY_RUNNERS="redash.query_runner.oracle,redash.query_runner.python" #Automatically clear query records REDASH_QUERY_RESULTS_CLEANUP_ENABLED="true" REDASH_QUERY_RESULTS_CLEANUP_COUNT="10000" REDASH_QUERY_RESULTS_CLEANUP_MAX_AGE="1"
- Create docker-compose.yml file
version: "2" x-redash-service: &redash-service image: redash/redash:preview logging: driver: json-file options: max-size: 10m max-file: 3 depends_on: - postgres - redis env_file: - ./env restart: always services: server: <<: *redash-service command: server ports: - "5000:5000" environment: REDASH_WEB_WORKERS: 10 scheduler: <<: *redash-service command: scheduler environment: QUEUES: "celery" WORKERS_COUNT: 10 scheduled_worker: <<: *redash-service command: worker environment: QUEUES: "scheduled_queries,schemas,periodic,default" WORKERS_COUNT: 2 adhoc_worker: <<: *redash-service command: worker environment: QUEUES: "queries" WORKERS_COUNT: 4 redis: image: redis:6.0.6-alpine container_name: redash-redis restart: always postgres: image: postgres:15.3-alpine logging: driver: json-file options: max-size: 10m max-file: 3 container_name: redash-postgres volumes: - ./postgres-data:/var/lib/postgresql/data env_file: - ./env ports: - "5432:5432" restart: always
Building
- If have already database. let’s update REDASH_DATABASE_URL and POSTGRES_PASSWORD then run
docker compose up -d
- If have not database. please run
docker compose run --rm server create_db docker compose up -d
Accessing the Redash Web Interface
Once the services are up and running, you can access the Redash web interface by navigating to http://localhost:5000 in your web browser.