Inverse Watch Docs
AppLanding
  • Overview
    • Home
    • Governance
      • Proposal 7
      • Proposal 25
      • Proposal 52
      • Proposal 107
      • Proposal 147 - S1
      • Proposal 189 - S2
  • Products
    • Inverse Alerts
      • See on Twitter
    • Inverse Chatbot
      • /doc
      • /imagine
      • /data
      • /graph
    • Inverse Subgraphs
      • See inverse-subgraph on Mainnet
      • See inverse-governance-subgraph on Mainnet
    • Inverse Watch
      • Go to App
  • User Guide
    • Quickstart
    • Alerts
      • Setting Up an Alert
      • Adding New Alert Destinations
      • Customize Alert Template
      • Multiple Column Alert
    • Queries
      • Creating and Editing Queries
      • Querying Existing Query Results
      • Query Parameters
      • How to Schedule a Query
      • Favorites & Tagging
      • Query Filters
      • How To Download / Export Query Results
      • Query Snippets
    • Visualizations
      • Cohort Visualizations
      • Visualizations How-To
      • Chart Visualizations
      • Formatting Numbers in Visualizations
      • How to Make a Pivot Table
      • Funnel Visualizations
      • Table Visualization Options
      • Visualizations Types
    • Dashboards
      • Creating and Editing Dashboards
      • Favorites & Tagging
      • Sharing and Embedding Dashboards
    • Data Sources
      • CSV & Excel Files
      • Google Sheets
      • JSON (API)
      • Python
      • EVM Chain Logs
      • EVM Chain State
      • GraphQL
      • Dune API
    • Machine Learning
      • Data Engineering
      • Regressors
        • Linear Regression
        • Random Forest
        • Ada Boosting
        • Gradient Boosting
        • Neural Network (LSTM)
      • Training and Predicting
      • Metrics & Overfitting
      • Examples
        • Price Prediction
          • Data Preprocessing
          • Model Creation & Training
          • Metrics Evaluation
          • Back Testing
          • Visualizing
        • Liquidation Risk
  • Admin & Dev Guide
    • Setup
    • Redash
    • Integrations & API
    • Query Runners
    • Users
      • Adding a Profile Picture
      • Authentication Options
      • Group Management
      • Inviting Users to Use Redash
      • Permissions & Groups
    • Visualizations
  • Cheat Sheets
    • Snippets
    • Contracts
  • More
    • Deprecated Apps
    • Github : inverse-flaskbot
    • Github : inverse-subgraph
    • Github : inverse-watch
Powered by GitBook
On this page
  • 1. Installing Docker, Docker Compose and Node.js
  • 2. Setup
  • 3. Usage

Was this helpful?

  1. Admin & Dev Guide

Setup

https://redash.io/help/open-source/dev-guide/docker

PreviousLiquidation RiskNextRedash

Last updated 1 year ago

Was this helpful?

1. Installing Docker, Docker Compose and Node.js

We will use Docker to run all the services needed, except for Node.js which we will run locally.

  1. .

  2. (14.16.1 or newer, can be installed with Homebrew on OS/X)

  3. Install Yarn (1.22.10 or newer): npm install --global yarn@1.22.10SetupSetup

2. Setup

i. Clone the Git repository

First you will need to clone the Git repository:

git clone https://github.com/getredash/redash.git
cd redash/

ii. Set up environment variables

Create a .env file at the root and set any environment variables you need.

$ touch .env

An environment variable named REDASH_COOKIE_SECRET is required to run the application. Read more why Redash uses secret keys

You should include any relevant in this file.

iii. Create Docker Services

Once you have the above setup, you need to create the Docker services:

docker-compose up -d

This will build the Docker images and fetch some prebuilt images and then start the services (Redash web server, worker, PostgreSQL and Redis). You can refer to the docker-compose.yml file to see the full configuration.

If you hit an errno 137 or errno 134 particularly at RUN yarn build, make sure you give your Docker VM enough memory (4GB or more).

vi. Install Node Packages

yarn --frozen-lockfile

v. Create Database

# Create tables
docker-compose run --rm server create_db

# Create database for tests
docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests"

vi. Health Check for Installation

After your installation is complete, you can do the healthcheck by calling /ping API endpoint.

RESPONSE

PONG.

3. Usage

i. Run webpack Dev Server

Once all Docker services are running (can be started either by docker-compose up or docker-compose start), Redash is available at http://localhost:5000/.

While we will use webpack’s dev server, we still need to build the frontend assets at least once, as some of them used for static pages (login page and such):

yarn build

To work on the frontend code, you need to use the webpack dev server, which you start with:

yarn start

Now the dev server is available at http://localhost:8080. It rebuilds the frontend code when you change it and refreshes the browser. All the API calls are proxied to localhost:5000 (the server running in Docker).

ii. Installing new Python packages (requirements.txt)

If you pulled a new version with new packages or added some yourself, you will need to rebuild the server and worker images:

docker-compose build worker
docker-compose build server

iii. Running Tests

docker-compose run --rm server tests

Before running tests for the first time, you need to create a database for tests:

docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests;"

vi. Debugging

See

Install Docker and Docker Compose
Install Node.js
here
environment variables
Debugging a Redash Server on Docker Using Visual Studio Code