Composer Project - Redash + Redis + Postgres On Synology NAS

I am just diving into how Containers work, and have gotten pretty far, but when orchestrating a few images into one project yml file, I am running around in circles.

So I have the following images:

  1. redash/redash:latest <-- The primary app...
  2. redis:latest
  3. postgres:latest

I have all my ports open for each service, and tested that I could login to the postgres database from adminer:latest running in the same container.

I used a few different examples from the gitrepos, and other stack articles to build the bellow yml file and the help of @David Maze.

I believe now that I am missing a database setup file for Redash. The scheduler that interacts with my data base gives me: ProgrammingError: (psycopg2.ProgrammingError) relation “queries” does not exist

I found this article: discuss.redash.io; where the poster is at the same point. A respondent said "Did you create the database tables?"

It looks that I need to run this command from from one of the Redash server consoles: docker-compose run --rm server create_db but I am using Synology's ContainerManager, not Docker...

Do I need a Volume to connect to the server create_db command?

Login is disabled on that site, otherwise I would try asking this question there.

Here is my updated yml:

version: "3.1"

x-redash-service: &redash-service
  image: redash/redash:latest
  depends_on:
    - db
    - cache
  restart: always

x-redash-env: &redash-env
  PYTHONUNBUFFERED: 0
  REDASH_LOG_LEVEL: "INFO"
  REDASH_REDIS_URL: "redis://cache:6379/0"
  REDASH_DATABASE_URL: "postgresql://postgres:postgresPassword@db/postgres"

services:
  redash:
    <<: *redash-service
    command: server
    ports:
      - "5003:5000"
    environment:
      <<: *redash-env
      REDASH_WEB_WORKERS: 4

  adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
      <<: *redash-env
      QUEUES: "queries"
      WORKERS_COUNT: 2

  scheduler:
    <<: *redash-service
    command: scheduler
    environment:
      <<: *redash-env
      QUEUES: "celery"
      WORKERS_COUNT: 1

  scheduled_worker:
    <<: *redash-service
    command: worker
    environment:
      <<: *redash-env
      QUEUES: "scheduled_queries,schemas"
      WORKERS_COUNT: 1

  db:
    image: postgres:latest
    restart: always
    ports:
      - "5433:5432"
    volumes:
      - ./postgres/data:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgresPassword
      POSTGRES_DB: postgresDatabase
    #command: "create_db"

  nginx:
    image: redash/nginx:latest
    ports:
      - "2501:80"
    depends_on:
      - redash
    restart: always

  cache:
    image: redis:latest
    restart: always
    depends_on:
      - db
    ports:
      - "6379:6379"
    volumes:
      - ./redis/data:/data:rw

Thanks again!

Please let me know if I should provide further details.

EDIT_1: Update yml composition and status of build

EDIT_2: Update yml composition and status of build && Narrowed scope of issue.



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations