[GH-ISSUE #82] Config file instead of/alternate to environmental variables #42

Closed
opened 2026-05-07 00:18:12 +02:00 by BreizhHardware · 1 comment

Originally created by @nwithan8 on GitHub (Jul 23, 2025).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/82

Originally assigned to: @glenndehaan on GitHub.

The feature

The number of environmental variables for this is starting to get out of control. Could you consider, from a Docker perspective, instead of having to define dozens of environmental variables, instead having a single config file mounted into the container instead?

Originally created by @nwithan8 on GitHub (Jul 23, 2025). Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/82 Originally assigned to: @glenndehaan on GitHub. ### The feature The number of environmental variables for this is starting to get out of control. Could you consider, from a Docker perspective, instead of having to define dozens of environmental variables, instead having a single config file mounted into the container instead?
BreizhHardware 2026-05-07 00:18:12 +02:00
Author
Owner

@glenndehaan commented on GitHub (Jul 23, 2025):

Hi @nwithan8,

I have some good news, technically this is already possible.
See the Home Assistant addon injects its configuration into a specific location within the container for me to read it.

And you could utilize this as well. It works like this:

options.json:

{
  "unifi_ip": "192.168.1.1"
}

docker-compose.yml:

services:
  unifi-voucher-site:
    image: glenndehaan/unifi-voucher-site:latest
    ports:
      - "3000:3000"
    volumes:
      - options.json:/data/options.json

You basically lowercase the now already available environment variables.
I will update the README to reflect this option is also available for people who don't like the environment variables.

Kind regards,
Glenn de Haan

<!-- gh-comment-id:3109478177 --> @glenndehaan commented on GitHub (Jul 23, 2025): Hi @nwithan8, I have some good news, technically this is already possible. See the Home Assistant addon injects its configuration into a specific location within the container for me to read it. And you could utilize this as well. It works like this: options.json: ```json { "unifi_ip": "192.168.1.1" } ``` docker-compose.yml: ```yaml services: unifi-voucher-site: image: glenndehaan/unifi-voucher-site:latest ports: - "3000:3000" volumes: - options.json:/data/options.json ``` You basically lowercase the now already available environment variables. I will update the README to reflect this option is also available for people who don't like the environment variables. Kind regards, Glenn de Haan
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/unifi-voucher-site#42
No description provided.