
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
- Clone the Redash repository (or download a .zip release).
- Make sure you have a Docker machine up and running.
- Make sure your current working directory is the root of this GitHub repository.
- 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)
- Run docker-compose -f docker-compose.production.yml run --rm server create_db to set up the database.
- Run docker-compose -f docker-compose.production.yml up.
- 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