Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using custom port and host address for the database #2795

Open
jpatidar30 opened this issue Apr 8, 2024 · 1 comment
Open

Using custom port and host address for the database #2795

jpatidar30 opened this issue Apr 8, 2024 · 1 comment

Comments

@jpatidar30
Copy link

Issue:
None of the environment variables (MARQUEZ_DB_HOST, POSTGRES_HOST, POSTGRESQL_HOST, POSTGRES_PORT) supplied to marquez seem to work for specifying the PostgreSQL host and port. Consequently, this prevents proper integration with external PostgreSQL instances.

Use Case:
In our deployment setup, we rely on an external PostgreSQL database to manage our data. As such, it is imperative to configure Marquez to connect to this external database by specifying the PostgreSQL host and port via environment variables.

Expected Behavior:
I expect Marquez to provide support for specifying the PostgreSQL host and port via environment variables when deployed using Docker images, allowing seamless integration with external PostgreSQL instances.

Docker Compose:

version: "3.7"
services:
  marquez_api:
    image: "marquezproject/marquez:0.46.0"
    container_name: marquez-api
    environment:
      - MARQUEZ_PORT=5000
      - MARQUEZ_ADMIN_PORT=5001
      - MARQUEZ_DB_HOST="test"
      - POSTGRES_HOST="test"
      - POSTGRESQL_HOST="test"
      - POSTGRES_PORT=5432
      - POSTGRES_DB=postgres
      - POSTGRES_USER=password
    ports:
      - "5000:5000"
      - "5001:5001"
    volumes:
      - data:/opt/marquez
    depends_on:
      - test

  marquez_web:
    image: marquezproject/marquez-web:0.46.0
    environment:
      - MARQUEZ_HOST=marquez_api
      - MARQUEZ_PORT=5000
    ports:
      - "3000:3000"
    stdin_open: true
    tty: true
    depends_on:
      - marquez_api

  test:
    image: postgres:14
    container_name: marquez-db
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - MARQUEZ_DB=marquez
      - MARQUEZ_USER=marquez
      - MARQUEZ_PASSWORD=marquez
    volumes:
      - db-conf-new:/etc/postgresql
      - db-init-new:/docker-entrypoint-initdb.d
      - db-backup-new:/var/lib/postgresql/data
    command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
    # Enables SQL statement logging (see: https://www.postgresql.org/docs/12/runtime-config-logging.html#GUC-LOG-STATEMENT)
    # command: ["postgres", "-c", "log_statement=all"]

volumes:
  data:
  db-conf-new:
  db-init-new:
  db-backup-new:
Copy link

boring-cyborg bot commented Apr 8, 2024

Thanks for opening your first issue in the Marquez project! Please be sure to follow the issue template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant