GitHub user dosubot[bot] added a comment to the discussion: How to setup
websocket for Superset?
<!-- Answer -->
To set up a WebSocket for Superset after cloning the repository and checking
out tag 4.1.2, you need to ensure that your `docker-compose.yml` file includes
a service definition for `superset-websocket`. Here's a configuration snippet
that should be included:
```yml
superset-websocket:
container_name: superset_websocket
build: ./superset-websocket
ports:
- 8080:8080
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- redis
volumes:
- ./superset-websocket:/home/superset-websocket
- /home/superset-websocket/node_modules
- /home/superset-websocket/dist
-
./docker/superset-websocket/config.json:/home/superset-websocket/config.json
environment:
- PORT=8080
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_SSL=false
```
Make sure the `superset-websocket` directory and the `config.json` file exist
in the specified paths. The `config.json` should include necessary
configurations like port, logging, Redis settings, and JWT configurations.
Here's an example of what the `config.json` might look like:
```json
{
"port": 8080,
"logLevel": "info",
"logToFile": false,
"logFilename": "app.log",
"statsd": {
"host": "127.0.0.1",
"port": 8125,
"globalTags": []
},
"redis": {
"port": 6379,
"host": "127.0.0.1",
"password": "",
"db": 0,
"ssl": false
},
"redisStreamPrefix": "async-events-",
"jwtAlgorithms": ["HS256"],
"jwtSecret": "CHANGE-ME-IN-PRODUCTION-GOTTA-BE-LONG-AND-SECRET",
"jwtCookieName": "async-token",
"pingSocketsIntervalMs": 30000,
"socketResponseTimeoutMs": 10000,
"gcChannelsIntervalMs": 60000
}
```
Ensure that your environment meets the requirements for Node.js and Redis as
specified in the `package.json` and README files
<sup>[[1]](https://github.com/apache/superset/blob/master/docker-compose.yml)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/docker/superset-websocket/config.json)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great
Response](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=great_response)
| [Irrelevant
Answer](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=irrelevant_answer)
| [Incorrect
Sources](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=incorrect_sources)
| [Too
Verbose](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=hallucination)
| [Bug
Report](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/c247ef5f-b8ee-420d-b52c-b148da32f3ed?feedback_type=other)</sup>
GitHub link:
https://github.com/apache/superset/discussions/33293#discussioncomment-12988119
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]