Redash详细部署教程
2019-04-10 本文已影响0人
乔治大叔
Redash 在 docker 中部署
redash 都是很不错的数据分析工具,支持多种数据源,同时可以方便的生成报表 ,基本上都支持定制化报表界面、通知。本文是基于使用docker compose 做运行测试
配置环境
- docker compose 文件
version: '3'
services:
server:
build: .
command: dev_server
depends_on:
- postgres
- redis
ports:
- "5000:5000"
- "5678:5678"
volumes:
- ".:/app"
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
REDASH_RATELIMIT_ENABLED: "false"
worker:
build: .
command: scheduler
volumes:
- ".:/app"
depends_on:
- server
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery,schemas"
WORKERS_COUNT: 2
redis:
image: redis:3-alpine
restart: unless-stopped
postgres:
image: postgres:9.5-alpine
# The following turns the DB into less durable, but gains significant performance improvements for the tests run (x3
# improvement on my personal machine). We should consider moving this into a dedicated Docker Compose configuration for
# tests.
ports:
- "15432:5432"
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF"
restart: unless-stopped
- 启动
8D27CB29-5BFE-4056-A285-449C6EF0804B.pngdocker-compose up -d
- 初始化系统数据(pg 数据库)
9901B209-DD28-4510-813C-5A85C8653A9F.pngdocker-compose run --rm server create_db
登录
image
配置
-
系统配置
比较简单,按照提示就可以了 -
添加数据源
image我配置的是系统使用的Mysql 数据库
891D13BF-88AC-43DB-A935-D48CC2517037.png
-
创建查询
image image -
添加图表
image image -
添加dashboard
image image -
添加通知模版
支持邮件、webhook、一些常见的沟通工具,还是很方便的。
image