[PR #3972] [MERGED] Set signal flags from environment variables #24269

Closed
opened 2026-08-05 06:08:28 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3972
Author: @Silex
Created: 6/13/2025
Status: Merged
Merged: 6/13/2025
Merged by: @mlsmaycon

Base: mainHead: signal-env


📝 Commits (1)

  • be5483e Set flags from environment variables

📊 Changes

2 files changed (+36 additions, -0 deletions)

View changed files

signal/cmd/env.go (+35 -0)
📝 signal/cmd/run.go (+1 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/3972 **Author:** [@Silex](https://github.com/Silex) **Created:** 6/13/2025 **Status:** ✅ Merged **Merged:** 6/13/2025 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `signal-env` --- ### 📝 Commits (1) - [`be5483e`](https://github.com/netbirdio/netbird/commit/be5483e5823b249464d3b9830f314763b4f129b9) Set flags from environment variables ### 📊 Changes **2 files changed** (+36 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `signal/cmd/env.go` (+35 -0) 📝 `signal/cmd/run.go` (+1 -0) </details> ### 📄 Description ## 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:08:28 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#24269