Skip to content

Add support to retrieve a password from a file #285

@Sycri

Description

@Sycri

Would it be possible to retrieve the password of a database from a file instead of specifying it directly in an environment variable?

Example configuration in section databases:

databases:
  default:
    username: ${DB_USERNAME}
    passwordFile: ${DB_PASSWORD_FILE}
    url: localhost:1521/freepdb1

Example docker-compose.yaml:

secrets:
  database_password:
    file: ./secrets/database_password
services:
  exporter:
    image: container-registry.oracle.com/database/observability-exporter
    container_name: exporter
    command:
      - '--config.file=/exporter/config.yaml'
    ports:
      - 9161:9161
    environment:
      - DB_USERNAME=pdbadmin
      - DB_PASSWORD_FILE=/run/secrets/database_password
    secrets:
      - database_password
    volumes:
      - ./exporter:/exporter

In the configuration file passwordFile could be specified instead of password and the password itself would be served from a Docker secret.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions