Dev use

To start all Docker services, you have two options: you can use either docker-compose up or docker-compose start.

Once all Docker services are running, you can validate this by verifying that Redash is available at http://localhost:5000/

We will use the webpack dev server (https://webpack.js.org/configuration/dev-server/) here. However, we still need to build the frontend assets at least once, as some of them are used for static pages (for example, the login page). To do this, run the following code:

npm run build

To work on the frontend code, you will need the webpack dev server up and running:

npm run start

Now, the dev server will be available at http://localhost:8080, and you will be able to see the login screen for the first time:

This rebuilds the frontend code every time you change it and refreshes the browser.

All the API calls are proxied to localhost:5000 (the backend server running in Docker).

  • Restarting Celery Workers: The web server will restart on code changes, but the Celery workers won't. In case you need to restart them, for example when modifying a query runner's code, run the following command (or just stop docker-compose up and run it again):
      docker-compose restart worker
  • Installing new Python packages (requirements.txt): If you pulled a new version with new packages, or added packages by yourself, you will need to rebuild the server and worker images. You can do so by using the following commands:
      docker-compose build worker
docker-compose build server
  • Running tests:
      docker-compose run --rm server tests

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

docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests;"
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset