官术网_书友最值得收藏!

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
主站蜘蛛池模板: 商丘市| 定兴县| 克山县| 江达县| 明星| 平谷区| 杭锦旗| 古田县| 青冈县| 平定县| 黄浦区| 依兰县| 安康市| 台东市| 霍林郭勒市| 绥中县| 乃东县| 哈尔滨市| 宣威市| 海城市| 闻喜县| 安仁县| 房产| 台山市| 抚松县| 逊克县| 盐源县| 金华市| 红河县| 含山县| 旬邑县| 无为县| 鹤壁市| 水富县| 壤塘县| 襄汾县| 金溪县| 桂平市| 太白县| 磴口县| 赤水市|