mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-25 20:29:48 +00:00
scripts: allow setting relay address server
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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:-}
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user