Hi all,
I had a working v8 setup which I tried to modify for v9 using the limited information in the v9 announcement.
Currently receiving could not translate host name "postgres" to address: Temporary failure in name resolution
error on the docker-compose run --rm server create_db
step.
I did not encounter this issue with my v8 setup which is strange and leads me to believe the env settings aren’t to blame as they have not changed. I have always had POSTGRES_PASSWORD
set on as an env var for the postgres container which is the suggested method. I have also tried setting POSTGRES_HOST_AUTH_METHOD=trust
but that also did not fix the issue.
Would be super useful if anyone could share a working docker-compose setup for v9, or point me in the right direction.
Pasting my config here for reference.
version: "2"
x-redash-service: &redash-service
build: .
depends_on:
- postgres
- redis
restart: always
services:
server:
<<: *redash-service
command: server
ports:
- "5000:5000"
environment:
- PYTHONUNBUFFERED=0
- REDASH_LOG_LEVEL=INFO
- REDASH_REDIS_URL=redis://redis:6379/0
- POSTGRES_PASSWORD=REDACTED
- REDASH_COOKIE_SECRET=REDACTED
- REDASH_SECRET_KEY=REDACTED
- REDASH_DATABASE_URL=postgresql://postgres:REDACTED@postgres/postgres
- REDASH_WEB_WORKERS=2
- REDASH_LDAP_LOGIN_ENABLED=true
- REDASH_LDAP_URL=microburst.atg-corp.net:389
- REDASH_LDAP_BIND_DN=REDACTED
- REDASH_LDAP_BIND_DN_PASSWORD=REDACTED
- REDASH_LDAP_SEARCH_DN=REDACTED
- REDASH_LDAP_SEARCH_TEMPLATE=(sAMAccountName=%(username)s)
- REDASH_LDAP_DISPLAY_NAME_KEY=cn
- REDASH_PASSWORD_LOGIN_ENABLED=false
scheduler:
<<: *redash-service
command: scheduler
environment:
- PYTHONUNBUFFERED=0
- REDASH_LOG_LEVEL=INFO
- REDASH_REDIS_URL=redis://redis:6379/0
- POSTGRES_PASSWORD=REDACTED
- REDASH_COOKIE_SECRET=REDACTED
- REDASH_SECRET_KEY=REDACTED
- REDASH_DATABASE_URL=postgresql://postgres:REDACTED@postgres/postgres
- QUEUES="celery"
- WORKERS_COUNT=1
worker:
<<: *redash-service
command: worker
environment:
QUEUES: "periodic emails default"
WORKERS_COUNT: 1
query_worker:
<<: *redash-service
command: worker
environment:
- PYTHONUNBUFFERED=0
- REDASH_LOG_LEVEL=INFO
- REDASH_REDIS_URL=redis://redis:6379/0
- POSTGRES_PASSWORD=REDACTED
- REDASH_COOKIE_SECRET=REDACTED
- REDASH_SECRET_KEY=REDACTED
- REDASH_DATABASE_URL=postgresql://postgres:REDACTED@postgres/postgres
- QUEUES="scheduled_queries schema queries
- WORKERS_COUNT=1
redis:
image: redis:5.0-alpine
restart: always
postgres:
image: postgres:9.6-alpine
environment:
- PYTHONUNBUFFERED=0
- REDASH_LOG_LEVEL=INFO
- REDASH_REDIS_URL=redis://redis:6379/0
- POSTGRES_PASSWORD=REDACTED
- REDASH_COOKIE_SECRET=REDACTED
- REDASH_SECRET_KEY=REDACTED
- REDASH_DATABASE_URL=postgresql://postgres:REDACTED@postgres/postgres
volumes:
- /data/redash/postgres:/var/lib/postgresql/data
restart: always
nginx:
image: redash/nginx:latest
ports:
- "8901:80"
depends_on:
- server
links:
- server:redash
restart: always