[PR #3972] Set signal flags from environment variables #4028

Open
opened 2025-11-20 08:07:35 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/3972

State: closed
Merged: Yes


Describe your changes

Hello, I like the idea of being able to configure the services from an env file for the relay service (e.g NB_LISTEN_PORT), so I copied this to the relay service.

I did not test nor compile the code, just did what looked correct.

If it happens to be correct, I'll also do it with the other services (management).

Once merged, we should be able to go from:

  signal:
    image: netbirdio/signal:$NETBIRD_SIGNAL_TAG
    command: ["--letsencrypt-domain", "foo.com", "--ssl-dir", "/etc/letsencrypt"]

To:

  signal:
    image: netbirdio/signal:$NETBIRD_SIGNAL_TAG
    environment:
      NB_LETSENCRYPT_DOMAIN: foo.com
      NB_SSL_DIR: /etc/letsencrypt

Or better use an env_file and have better agnosticism in the docker-compose file.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/3972 **State:** closed **Merged:** Yes --- ## Describe your changes Hello, I like the idea of being able to configure the services from an env file for the relay service (e.g `NB_LISTEN_PORT`), so I copied this to the relay service. I did not test nor compile the code, just did what looked correct. If it happens to be correct, I'll also do it with the other services (management). Once merged, we should be able to go from: ``` yaml signal: image: netbirdio/signal:$NETBIRD_SIGNAL_TAG command: ["--letsencrypt-domain", "foo.com", "--ssl-dir", "/etc/letsencrypt"] ``` To: ``` yaml signal: image: netbirdio/signal:$NETBIRD_SIGNAL_TAG environment: NB_LETSENCRYPT_DOMAIN: foo.com NB_SSL_DIR: /etc/letsencrypt ``` Or better use an `env_file` and have better agnosticism in the docker-compose file. ## Issue ticket number and link ## Stack ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md).
saavagebueno added the pull-request label 2025-11-20 08:07:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4028