Skip to content

[Feature request]: Add support for OPENVOXDB_POSTGRES_PASSWORD_FILE env var #6

@mdechiaro

Description

@mdechiaro

Use Case

This environment varable would support secrets in a docker compose setup. The postgres container and puppetdb container can share the secret for ease of use. Here is an example config:

---
services:
  postgres:
    environment:
      POSTGRES_PASSWORD_FILE: "/run/secrets/db_password"
    secrets:
    - db_password
  puppetdb:
    environment:
      OPENVOXDB_POSTGRES_PASSWORD_FILE: "/run/secrets/db_password"
    secrets:
    - db_password
secrets:
  db_password:
    file: "/path/to/db_password"

Describe the solution you would like

A shell function would need to be added docker-entrypoint.d that can read /run/secrets/db_password and set OPENVOXDB_POSTGRES_PASSWORD with the password.

Describe alternatives you've considered

No response

Additional context

The postgres image supports this _FILE feature with the following variables. For this request, I believe the password env var is most important.

POSTGRES_INITDB_ARGS
POSTGRES_PASSWORD
POSTGRES_USER
POSTGRES_DB

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions