4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Re:Dashのインストール(Docker)

Last updated at Posted at 2020-07-23

DockerでBIツールのRe:Dashをインストールした際のメモ。
MetabaseやSupersetが競合。
SQL必須と使い勝手はイマイチだが、接続先候補が多いのが特徴。

公式サイト
https://redash.io

Plotly Dashと間違えて入れたのは内緒です……。

1. インストール手順

docker-compose.yml


version: '2'
x-redash-service: &redash-service
  image: redash/redash:latest
  depends_on:
    - postgres
    - redis
  env_file: 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,schemas"
      WORKERS_COUNT: 1
  adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "queries"
      WORKERS_COUNT: 2
  redis:
    image: redis:latest
    restart: always
  postgres:
    image: postgres:latest
    env_file: redash.env
    restart: always
  nginx:
    image: redash/nginx:latest
    ports:
      - "80:80"
    depends_on:
      - server
    links:
      - server:redash
    restart: always

同一フォルダに環境設定ファイルを作成する。
redash.env

REDASH_HOST=http://localhost/redash
PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_DB= redash
POSTGRES_USER= redash
POSTGRES_PASSWORD= hogehoge
REDASH_COOKIE_SECRET=redash-selfhosted
REDASH_SECRET_KEY=redash-selfhosted
REDASH_DATABASE_URL=postgresql://redash:hogehoge@postgres/postgres

REDASH_DATABASE_URLに
「POSTGRES_USERの値:POSTGRES_PASSWORD値@postgres/postgres」
を入れるのがポイント。

※ パスワード要らないという外人のサイトに騙されるなど……。

2. 起動とアクセス

docker-compose.ymlのあるフォルダにて下記コマンドで起動。

docker-compose run --rm server create_db
docker-compose up -d

REDASH_HOSTの設定(http://localhost/redash
でアクセスできる。

3. 削除

削除はdocker-compose.ymlのフォルダで下記を実施。

docker-compose down --rmi all --volumes

以上

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?