diff --git a/bumper/__init__.py b/bumper/__init__.py index 18fc78a..6dc7910 100644 --- a/bumper/__init__.py +++ b/bumper/__init__.py @@ -72,10 +72,11 @@ shutting_down = False bumperlog = get_logger("bumper") logging.getLogger("asyncio").setLevel(logging.CRITICAL + 1) # Ignore this logger +conf_server_https_port = os.environ.get("WEB_SERVER_HTTPS_PORT") or 443 mqtt_listen_port = 8883 xmpp_listen_port = 5223 conf_server_bindings = [ - WebServerBinding(bumper_listen, 8443, True), + WebServerBinding(bumper_listen, conf_server_https_port, True), WebServerBinding(bumper_listen, 8007, False), ] diff --git a/docs/Env_Var.md b/docs/Env_Var.md index 2ca3dfd..60ac3b7 100644 --- a/docs/Env_Var.md +++ b/docs/Env_Var.md @@ -2,14 +2,15 @@ Bumper has a number of environment variables to help with custom deployments and configuration. These should be set prior to executing Bumper. -| Setting | Value | Description | -| ------------------ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| BUMPER_LISTEN | {ipv4 address} | IP address to start server listeners on | -| BUMPER_ANNOUNCE_IP | {ipv4 address} | IP address to tell bots when they request the server location. May need to be set in cases such as when LISTEN is 0.0.0.0. | -| BUMPER_CA | {full path to ca.crt location} | The public CA certificate (ca.crt) to be loaded | -| BUMPER_CERT | {full path to bumper.crt location} | The public server certificate (bumper.crt) to be used by the Bumper server | -| BUMPER_KEY | {full path to bumper.key location} | The private server key (bumper.key) to be used by the Bumper server | -| BUMPER_LOGS | {full path to logs directory} | The directory where logs should be stored | -| BUMPER_DATA | {full path to data directory} | The directory where persistent data should be stored (bumper.db) | -| BUMPER_DEBUG | true | Run Bumper with debug mode/logging | -| LOG_TO_STDOUT | true | Instead of logging to logs/, logs to to STDOUT | +| Setting | Value | Description | +| --------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| BUMPER_LISTEN | {ipv4 address} | IP address to start server listeners on | +| BUMPER_ANNOUNCE_IP | {ipv4 address} | IP address to tell bots when they request the server location. May need to be set in cases such as when LISTEN is 0.0.0.0. | +| BUMPER_CA | {full path to ca.crt location} | The public CA certificate (ca.crt) to be loaded | +| BUMPER_CERT | {full path to bumper.crt location} | The public server certificate (bumper.crt) to be used by the Bumper server | +| BUMPER_KEY | {full path to bumper.key location} | The private server key (bumper.key) to be used by the Bumper server | +| BUMPER_LOGS | {full path to logs directory} | The directory where logs should be stored | +| BUMPER_DATA | {full path to data directory} | The directory where persistent data should be stored (bumper.db) | +| BUMPER_DEBUG | true | Run Bumper with debug mode/logging | +| LOG_TO_STDOUT | true | Instead of logging to logs/, logs to to STDOUT | +| WEB_SERVER_HTTPS_PORT | 443 | Port for the HTTPS web server. As the default port is a privileged one (<1024), you need root permission for it. | diff --git a/pytest.ini b/pytest.ini index 16b0152..c93cbf8 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,6 +3,7 @@ env = D:BUMPER_CA=tests/test_certs/ca.crt D:BUMPER_CERT=tests/test_certs/bumper.crt D:BUMPER_KEY=tests/test_certs/bumper.key + WEB_SERVER_HTTPS_PORT=8443 asyncio_mode = auto timeout = 10