Use env var to set use_ssl, login_disabled and allow_cors configs (#355)

This commit is contained in:
Jonathan Zernik 2020-11-01 13:25:12 -05:00 committed by GitHub
parent 26e054de3c
commit 7f8b71841f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -40,6 +40,10 @@ services:
build:
context: ../
dockerfile: docker/sqkserver/Dockerfile
environment:
- WEBADMIN_USE_SSL
- WEBADMIN_LOGIN_DISABLED
- WEBADMIN_ALLOW_CORS
volumes:
- shared:/rpc
- ~/.lnd:/root/.lnd

View file

@ -67,9 +67,9 @@ def load_admin_web_server(config, handler) -> SqueakAdminWebServer:
config["webadmin"]["port"],
config["webadmin"]["username"],
config["webadmin"]["password"],
config["webadmin"].getboolean("use_ssl", fallback=False),
config["webadmin"].getboolean("login_disabled", fallback=False),
config["webadmin"].getboolean("allow_cors", fallback=False),
environ.get('WEBADMIN_USE_SSL') or config["webadmin"].getboolean("use_ssl", fallback=False),
environ.get('WEBADMIN_LOGIN_DISABLED') or config["webadmin"].getboolean("login_disabled", fallback=False),
environ.get('WEBADMIN_ALLOW_CORS') or config["webadmin"].getboolean("allow_cors", fallback=False),
handler,
)