scripts: allow setting relay address server

This commit is contained in:
shum
2026-08-21 13:47:05 +00:00
parent 86f258b8d3
commit cbe078d8d4
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -10,6 +10,9 @@ POSTGRES_PASSWORD=change-me
# Ref to build: tag, branch or commit.
CHAT_REF=88df79d1e26921c7d1835fc8484fade596356fb6
# SMP server for the relay address, used when the address is created.
#RELAY_ADDRESS_SERVER=smp://<fingerprint>@smp.example.com
# GHC runtime options, without the +RTS/-RTS markers.
#RELAY_RTS_OPTS="-N -F1.2 -A16m -I0.01 -Iw15"
+1
View File
@@ -14,6 +14,7 @@ services:
environment:
RELAY_NAME: ${RELAY_NAME}
RELAY_WEB_DOMAIN: ${RELAY_WEB_DOMAIN}
RELAY_ADDRESS_SERVER: ${RELAY_ADDRESS_SERVER:-}
# Empty values fall back to the entrypoint defaults.
RELAY_RTS_OPTS: ${RELAY_RTS_OPTS:-}
RELAY_POOL_SIZE: ${RELAY_POOL_SIZE:-}
+5
View File
@@ -78,6 +78,11 @@ def main():
common = [BIN, "--relay", "--headless", "--user-display-name", name]
# Only applied when the address is created, which the one-shot below does.
address_server = os.environ.get("RELAY_ADDRESS_SERVER")
if address_server:
common += ["--relay-address-server", address_server]
# The image is applied only when the profile is created.
if not os.path.exists(ADDR_FILE):
oneshot = common + (["--user-image-file", image_file] if image_file else []) + ["-d", conn]