From e2cce6e1077a724d95ff40f6afd784c267d543c1 Mon Sep 17 00:00:00 2001 From: Rethakgetse-Manaka Date: Mon, 5 Aug 2024 11:47:55 +0200 Subject: [PATCH] Docker files for centrifugo included --- occupi-backend/centrifugo | 1 - occupi-backend/counter/config.json | 12 ++++++++++++ occupi-backend/counter/docker-compose.yml | 14 ++++++++++++++ occupi-backend/pkg/handlers/realtime_handlers.go | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) delete mode 160000 occupi-backend/centrifugo create mode 100644 occupi-backend/counter/config.json create mode 100644 occupi-backend/counter/docker-compose.yml diff --git a/occupi-backend/centrifugo b/occupi-backend/centrifugo deleted file mode 160000 index 60d3746d..00000000 --- a/occupi-backend/centrifugo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60d3746d42bc95398d765eec8ffb9c36aed822e7 diff --git a/occupi-backend/counter/config.json b/occupi-backend/counter/config.json new file mode 100644 index 00000000..9b6b6c57 --- /dev/null +++ b/occupi-backend/counter/config.json @@ -0,0 +1,12 @@ +{ + "token_hmac_secret_key": "0afc8c43-497c-4bec-a996-c756208fb64f", + "admin_password": "7a56dd50-8ba9-42de-901f-c1223c10f334", + "admin_secret": "736a4fd4-cac7-4080-86d7-469c7b0bea60", + "api_key": "8c18e01e-c8f8-480b-af08-8a52b34f1569", + "namespaces": [ + { + "name": "public", + "anonymous": true + } + ] +} diff --git a/occupi-backend/counter/docker-compose.yml b/occupi-backend/counter/docker-compose.yml new file mode 100644 index 00000000..6d321bb3 --- /dev/null +++ b/occupi-backend/counter/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.9" +services: + centrifugo: + container_name: centrifugo + image: centrifugo/centrifugo:v5 + volumes: + - ./config.json:/centrifugo/config.json + command: centrifugo -c config.json + ports: + - 8000:8000 + ulimits: + nofile: + soft: 262144 + hard: 262144 \ No newline at end of file diff --git a/occupi-backend/pkg/handlers/realtime_handlers.go b/occupi-backend/pkg/handlers/realtime_handlers.go index 7b260775..15e0d1a3 100644 --- a/occupi-backend/pkg/handlers/realtime_handlers.go +++ b/occupi-backend/pkg/handlers/realtime_handlers.go @@ -21,7 +21,7 @@ var ( func init() { client = gocent.New(gocent.Config{ Addr: "http://localhost:8000/api", // Replace with your Centrifugo API address - Key: "c336846e-9e4f-4614-8fb7-a85a47e214b3", // Replace with your Centrifugo API key + Key: "8c18e01e-c8f8-480b-af08-8a52b34f1569", // Replace with your Centrifugo API key }) }