From 4f973539cef224e127f6e9efb35f32d9c870d81c Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sun, 14 Jun 2020 19:12:56 +0200 Subject: [PATCH] Change shittyserver's WS to go via thunderhorn Note that this will require a shittyserver deploy and restart because it used to bind to "127.0.0.1" but no longer does --- .env | 2 +- .env.production | 2 +- Jenkinsfile | 2 +- shittyserver.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index bf1edd2..30d7d95 100644 --- a/.env +++ b/.env @@ -3,4 +3,4 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_MYRADIO_NONAPI_BASE=https://ury.org.uk/myradio-staging REACT_APP_MYRADIO_BASE=https://ury.org.uk/api-staging/v2 REACT_APP_BROADCAST_API_BASE=https://ury.org.uk/webstudio/api/v1 -REACT_APP_WS_URL=wss://audio.ury.org.uk/webstudio/stream \ No newline at end of file +REACT_APP_WS_URL=wss://ury.org.uk/webstudio/api/stream diff --git a/.env.production b/.env.production index 6abe627..1a7f53c 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_MYRADIO_NONAPI_BASE=https://ury.org.uk/myradio REACT_APP_MYRADIO_BASE=https://ury.org.uk/api/v2 REACT_APP_BROADCAST_API_BASE=https://ury.org.uk/webstudio/api/v1 -REACT_APP_WS_URL=wss://audio.ury.org.uk/webstudio/stream \ No newline at end of file +REACT_APP_WS_URL=wss://ury.org.uk/webstudio/api/stream diff --git a/Jenkinsfile b/Jenkinsfile index 14149ad..e163177 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { environment { REACT_APP_MYRADIO_NONAPI_BASE = 'https://ury.org.uk/myradio' REACT_APP_MYRADIO_BASE = 'https://ury.org.uk/api/v2' - REACT_APP_WS_URL = 'wss://audio.ury.org.uk/webstudio/stream' + REACT_APP_WS_URL = 'wss://ury.org.uk/webstudio/api/stream' } steps { sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json' diff --git a/shittyserver.py b/shittyserver.py index c61f516..1878118 100644 --- a/shittyserver.py +++ b/shittyserver.py @@ -366,7 +366,7 @@ async def serve(websocket: websockets.WebSocketServerProtocol, path: str) -> Non start_server = websockets.serve( - serve, "localhost", int(config.get("shittyserver", "websocket_port")) + serve, host=None, port=int(config.get("shittyserver", "websocket_port")) ) print("Shittyserver WS starting on port {}.".format(config.get("shittyserver", "websocket_port")))