From 4f48752ff8d2a6881b4829e3f565a7f59717ecf1 Mon Sep 17 00:00:00 2001 From: val Date: Thu, 28 May 2026 17:49:04 +0200 Subject: [PATCH] added env for expiration time --- .env.sample | 2 ++ abra.sh | 2 +- compose.yml | 2 ++ config.yaml.tmpl | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 304f3d1..44ee41b 100644 --- a/.env.sample +++ b/.env.sample @@ -25,3 +25,5 @@ ENABLE_DERP=false # See https://git.coopcloud.tech/coop-cloud/backup-bot-two ENABLE_BACKUPS=true +# The amount of time a node is authenticated, default is set to 7d +#EXPIRY=0 \ No newline at end of file diff --git a/abra.sh b/abra.sh index 048c100..787b15a 100755 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,3 @@ # Set any config versions here # Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs -export CONFIG_YAML_VERSION=v4 +export CONFIG_YAML_VERSION=v5 \ No newline at end of file diff --git a/compose.yml b/compose.yml index 72482f2..27eeef6 100644 --- a/compose.yml +++ b/compose.yml @@ -8,6 +8,8 @@ services: volumes: # - config:/etc/headscale - data:/var/lib/headscale + environment: + EXPIRY: ${EXPIRY:-7d} configs: - source: config_yaml target: /etc/headscale/config.yaml diff --git a/config.yaml.tmpl b/config.yaml.tmpl index 24c0da2..f02bb4a 100644 --- a/config.yaml.tmpl +++ b/config.yaml.tmpl @@ -348,7 +348,7 @@ oidc: # The amount of time a node is authenticated with OpenID until it expires # and needs to reauthenticate. # Setting the value to "0" will mean no expiry. - expiry: 7d + expiry: {{ env "EXPIRY" }} # Use the expiry from the token received from OpenID when the user logged # in. This will typically lead to frequent need to reauthenticate and should -- 2.52.0