Docker-based installation

You can install Docker from the following link: https://docs.docker.com/install/

After installing Docker we can proceed to Redash installation

  1. Clone the Redash repository (or download a .zip release).
  2. Make sure you have a Docker machine up and running.
  3. Make sure your current working directory is the root of this GitHub repository.
  4. Use the docker-compose.production.yml configuration file and modify the configuration values as needed. For example, you may want to change these:
    • The Postgres volume location
    • The value of REDASH_COOKIE_SECRET (especially if this instance is not just for testing purposes)
  5. Run docker-compose -f docker-compose.production.yml run --rm server create_db to set up the database.
  6. Run docker-compose -f docker-compose.production.yml up.
  7. Redash should be available on port 80 of the host machine.

docker-compose.yml overview:

The following is an example configuration for Docker Compose. It is recommended that you update the cookie secret (used as the Redash browser cookie) and Postgres database password.
In order to persist Postgres data, assign it a volume host location. You can also split the worker service to ad hoc workers and scheduled queries workers (ad hoc workers will perform the execution of nonscheduled queries, as well as other tasks like sending emails and so on).

Scheduled services, as their name suggests, will perform the periodic execution of all scheduled queries.

In the file we can see the definition of the following: 

  • redash server - the main Redash server
  • celery scheduler
  • celery worker for scheduled queries
  • celery worker for adhoc queries
  • redis server 
  • postgres server - the Redash's operational db
  • nginx - serves as proxy for the Redash server
version: '2'
x-redash-service: &redash-service
  image: redash/redash:5.0.0.b4754
  depends_on:
    - postgres
    - redis
  env_file: /opt/redash/env
  restart: always
services:
  server:
    <<: *redash-service
    command: server
    ports:
      - "5000:5000"
    environment:
      REDASH_WEB_WORKERS: 4
  scheduler:
    <<: *redash-service
    command: scheduler
    environment:
      QUEUES: "celery"
      WORKERS_COUNT: 1
  scheduled_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "scheduled_queries"
      WORKERS_COUNT: 1
  adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "queries"
      WORKERS_COUNT: 2
  redis:
    image: redis:3.0-alpine
    restart: always
  postgres:
    image: postgres:9.5.6-alpine
    env_file: /opt/redash/env
    volumes:
      - /opt/redash/postgres-data:/var/lib/postgresql/data
    restart: always
  nginx:
    image: redash/nginx:latest
    ports:
      - "80:80"
    depends_on:
      - server
    links:
      - server:redash
    restart: always
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset