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

Feature Request: Add support for secrets when using Docker Compose #6

Open
iainchesworth opened this issue Dec 13, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@iainchesworth
Copy link

iainchesworth commented Dec 13, 2024

When using Docker compose (as described here), the password for the UPS monitor user needs to be passed in via an environment variable in the YAML.

It would be great to be able to use Docker secrets as shown in the Docker documentation to inject the password. Then, passwords would not need to be stored in the Docker compose file; this is a benefit when using GitOps or other CI/CD flows.

Example using Docker secrets:

secrets:
  nut-webgui-password:
    # See https://docs.docker.com/compose/use-secrets/
    file: /home/nut-webgui/nut-webgui-password.txt

services:
  nut-webgui:
    image: ghcr.io/superioone/nut_webgui:latest
    restart: always
    ports:
      - 80:1234
    environment:
      POLL_FREQ: "60"
      POLL_INTERVAL: "5"
      UPSD_ADDR: "myhost"
      UPSD_PORT: "1234"
      UPSD_USER: "admin"
      LISTEN: "0.0.0.0"
      PORT: "1234"
      LOG_LEVEL: "debug"
    secrets:
      - nut-webgui-password

In this example, the UPSD_USER's password would be loaded from /run/secrets/nut-webgui-password

@SuperioOne SuperioOne added the enhancement New feature or request label Dec 13, 2024
@SuperioOne SuperioOne self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants