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

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
主站蜘蛛池模板: 新兴县| 凌云县| 那坡县| 嘉禾县| 莱芜市| 射阳县| 苗栗市| 资兴市| 宽甸| 萨嘎县| 桐梓县| 高安市| 红桥区| 玛纳斯县| 年辖:市辖区| 齐河县| 临澧县| 静海县| 武冈市| 黔南| 迁安市| 彰武县| 清新县| 府谷县| 宝应县| 翁牛特旗| 湄潭县| 桃江县| 景德镇市| 乐安县| 阜宁县| 辽阳市| 彭泽县| 舒兰市| 大厂| 白水县| 洱源县| 班戈县| 五大连池市| 铁力市| 栖霞市|