Replies: 4 comments 6 replies
-
At some point in the next few weeks, we should really update the setup process to be super easy again. 😄 |
Beta Was this translation helpful? Give feedback.
-
Despite the dutch comments, just ignore those. Here is my version: '2.3'
# komt van https://github.com/GoodforGod/docker-compose-ultimate#Redash
# want is een stuk moderner dan de v1 docker-compose file die meegeleverd wordt. dat integreert niet met onze
# instellingen om andere databases te kunnen benaderen.
# alle instellingen zijn verhuist naar de .env file
#
# ## databases benaderen.
# 1. Laat services een port gebruiken die uniek is, onze shell scripts hebben daar support voor.
# 2. stel UFW in om verkeer op die poort toe te laten:
# `sudo ufw allow from 172.0.0.0/8 to 172.0.0.0/8 port 5551 proto tcp`
# dit stelt de dockers in staat om met elkaar te verbinden, zonder dat UFW deze verbinding
# eruit kegelt, maar van buiten af zijn deze poorten niet bereikbaar. wel zo veilig.
#
# 3. gebruik `host.docker.local` om verbinding te maken met de host vanuit redash, en gebruik
# de poort om onderscheid te maken tussen de verschillende diensten/databases.
#
# ## python toevoegen
# Volgens [deze uitleg](https://redash.io/help/data-sources/querying/python) hoef je alleen
# `REDASH_ADDITIONAL_QUERY_RUNNERS: "redash.query_runner.python"` toe te voegen aan je omgeving
#
networks:
broker:
# this network is shared with traefik as a reverse proxy.
# it should be shared *ONLY* with user-facing services.
# redash-server that is in this setup.
name: broker
external: true
# Redash service template. requires the command mostly
x-redash-service: &service-template
image: redash/redash:latest
depends_on:
- redash-redis
- redash-postgres
environment:
REDASH_RATELIMIT_ENABLED: ${REDASH_RATELIMIT_ENABLED}
REDASH_LOG_LEVEL: ${REDASH_LOG_LEVEL}
REDASH_COOKIE_SECRET: ${REDASH_COOKIE_SECRET}
REDASH_SECRET_KEY: ${REDASH_SECRET_KEY}
REDASH_REDIS_URL: redis://redash-redis/0
REDASH_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@redash-postgres/${POSTGRES_DB}
REDASH_ADDITIONAL_QUERY_RUNNERS: redash.query_runner.python
REDASH_FEATURE_ALLOW_CUSTOM_JS_VISUALIZATIONS: true
extra_hosts:
host.docker.internal: host-gateway
restart: unless-stopped
services:
redash-createdb:
<<: *service-template
command: create_db
restart: no
redash-server:
<<: *service-template
expose:
- 5000
depends_on:
- redash-redis
- redash-postgres
- redash-createdb
command: server
networks:
- default
- broker
labels:
- "traefik.enable=true"
- "traefik.http.services.${PROJECT}-server.loadbalancer.server.port=5000" # in case multipe ports are exposed, this label forces 5000
- "traefik.http.routers.${PROJECT}-secure.tls=true"
- "traefik.http.routers.${PROJECT}-secure.tls.certresolver=${CERTRESOLVER}"
- "traefik.http.routers.${PROJECT}-secure.rule=Host(`${APPLICATION_NAME}.${HOSTING_DOMAIN}`)"
- "traefik.docker.network=broker" # https://doc.traefik.io/traefik/providers/docker/#network
redash-scheduler:
<<: *service-template
command: scheduler
redash-worker:
<<: *service-template
command: worker
redash-redis:
image: redis
restart: unless-stopped
command: redis-server
redash-postgres:
image: postgres:13-alpine3.15
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
it uses this PYTHONUNBUFFERED=1
REDASH_RATELIMIT_ENABLED='false'
REDASH_LOG_LEVEL=INFO
REDASH_COOKIE_SECRET=secret-secret-secret-create-your-own-by-using-keepass-or-apg-on-lniux
REDASH_SECRET_KEY=secret-secret-secret-create-your-own-by-using-keepass-or-apg-on-lniux
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres-or-secret-secret-secret-create-your-own-by-using-keepass-or-apg-on-lniux
APPLICATION_NAME=redash
HOSTING_DOMAIN=domainname.tld
PROJECT=redash
CERTRESOLVER=letsencrypt I'll follow up with more documentation how this integrates with databases in other dockers (mind the firewall) and how to configure traefik in a separate docker-compose file to handle all incoming traffic and ssl-certificates automatically. |
Beta Was this translation helpful? Give feedback.
-
hi, is there any plan to have new versions/tags besides t2yr old docker images and preview? it'd be nice to have some more stable ones with more recent changes |
Beta Was this translation helpful? Give feedback.
-
@remcoboerma , you image is not working , worker is failing |
Beta Was this translation helpful? Give feedback.
-
Create two files,
docker-compose.yml
andenv
, respectively, under the same directory named redash.docker-compose.yml:
env:
Execute the following command in the same directory to create the database:
docker compose run --rm server create_db
In the directory to install Redash, execute the command :
docker compose up -d
Open http://127.0.0.1:5000/ to access Redash.
If this is your first time installing, opening http://127.0.0.1:5000 will display a prompt:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
This is because the Postgres database has not been created. Execute the following command in the same directory to create the database:
docker compose run --rm server create_db
redash中文部署以及操作手册
操作手册: https://www.yuque.com/summer-l4v2u/pxnwqp/bqgt5n
部署文档:https://redash.dazdata.com/docs/opensource/opensouce_install/installer_introduce
Beta Was this translation helpful? Give feedback.
All reactions