From 4c71e64562dc75d4b4013b2d3f899743beebfadb Mon Sep 17 00:00:00 2001 From: Stefan <144447266+gAlleb@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:09:50 +0300 Subject: [PATCH] Update and rename config.json to config.toml Use new config syntax for centrifugo 6 --- docker/centrifugo/config.json | 38 ---------------------------- docker/centrifugo/config.toml | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 38 deletions(-) delete mode 100644 docker/centrifugo/config.json create mode 100644 docker/centrifugo/config.toml diff --git a/docker/centrifugo/config.json b/docker/centrifugo/config.json deleted file mode 100644 index 56b1ca7..0000000 --- a/docker/centrifugo/config.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "port": 9998, - "admin_password": "111fff50-1111-1111-841a80111fff", - "admin_secret": "111fff9a-1111-1111-1111-8cf7ba111fff", - "api_insecure": false, - "api_key": "111fff39-283d-1111-88ea-111fff98a98a", - "allowed_origins": [ - "*" - ], - "admin": true, - "uni_sse": true, - "websocket_disable": true, - "uni_websocket": true, - "uni_http_stream": true, - "internal_port": 9998, - "allow_subscribe_for_client": true, - "allow_anonymous_connect_without_token": true, - "admin_insecure": false, - "swagger": false, - "namespaces": [ - { - "name": "station", - "history_size": 1, - "history_ttl": "30s", - "allow_subscribe_for_client": true, - "allow_subscribe_for_anonymous": true, - "allow_history_for_client": true, - "allow_history_for_anonymous": true, - "force_recovery": true, - "force_recovery_mode": "cache" - } - ], - "uni_sse_handler_prefix": "/connection/sse", - "uni_websocket_handler_prefix": "/connection/ws", - "client_connect_include_server_time": true -} - - diff --git a/docker/centrifugo/config.toml b/docker/centrifugo/config.toml new file mode 100644 index 0000000..d2f6bae --- /dev/null +++ b/docker/centrifugo/config.toml @@ -0,0 +1,47 @@ +[http_api] +insecure = false +key = "111fff39-283d-1111-88ea-111fff98a98a" + +[client] +allowed_origins = ["*"] +allow_anonymous_connect_without_token = true +connect_include_server_time = true + +[swagger] +enabled = false + +[admin] +enabled = true +insecure = false +password = "111fff50-1111-1111-841a80111fff" +secret = "111fff9a-1111-1111-1111-8cf7ba111fff" + +[uni_websocket] +enabled = true +handler_prefix = "/connection/ws" + +[uni_sse] +enabled = true +handler_prefix = "/connection/sse" + +[uni_http_stream] +enabled = true + +[http_server] +port = 9998 +internal_port = 9998 + +[websocket] +disabled = true + +[[channel.namespaces]] +name = "station" +history_size = 1 +history_ttl = "30s" +allow_subscribe_for_client = true +allow_subscribe_for_anonymous = true +allow_history_for_client = true +allow_history_for_anonymous = true +force_recovery = true +force_recovery_mode = "cache" +