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. :pensive:

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
1 Like

Here you go:

version: "2"
x-redash-service: &redash-service
  image: REDACTED/redash:9.0.0-beta.mt-custom-b21
  depends_on:
- 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
  schemas_worker:
<<: *redash-service
command: worker
environment:
  QUEUES: "schemas"
  WORKERS_COUNT: 1  
  adhoc_worker:
<<: *redash-service
command: worker
environment:
  QUEUES: "queries"
  WORKERS_COUNT: 2
  misc_worker:
<<: *redash-service
command: worker
environment:
  QUEUES: "default"
  WORKERS_COUNT: 1
  periodic_worker:
<<: *redash-service
command: worker
environment:
  QUEUES: "periodic"
  WORKERS_COUNT: 1
  emails_worker:
<<: *redash-service
command: worker
environment:
  QUEUES: "emails"
  WORKERS_COUNT: 1  
  redis:
image: redis:5.0-alpine
restart: always
  nginx:
image: redash/nginx:latest
ports:
  - "80:80"
  - "443:443"
depends_on:
  - server
links:
  - server:redash
volumes:
  - /opt/redash/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
  - /opt/redash/nginx/certs:/etc/letsencrypt
  - /opt/redash/nginx/certs-data:/data/letsencrypt
restart: always

Hmm thank you, looks very similar to mine. Would you be able to show me a redacted copy of your env file? I am having issues with postgresql while running docker-compose run --rm server create_db. I am wondering if its to do with how I have set that up.