mirror of https://github.com/apache/superset.git
chore: get websocket service to start in docker-compose (#28135)
This commit is contained in:
parent
b7f3e0bb50
commit
063914af04
|
@ -120,6 +120,10 @@ services:
|
|||
- ./superset-websocket:/home/superset-websocket
|
||||
- /home/superset-websocket/node_modules
|
||||
- /home/superset-websocket/dist
|
||||
|
||||
# Mounting a config file that contains a dummy secret required to boot up.
|
||||
# do no not use this docker-compose in production
|
||||
- ./docker/superset-websocket/config.json:/home/superset-websocket/config.json
|
||||
environment:
|
||||
- PORT=8080
|
||||
- REDIS_HOST=redis
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"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"
|
||||
}
|
|
@ -94,8 +94,17 @@ export const statsd = new StatsD({
|
|||
});
|
||||
|
||||
// enforce JWT secret length
|
||||
if (startServer && opts.jwtSecret.length < 32)
|
||||
throw new Error('Please provide a JWT secret at least 32 bytes long');
|
||||
if (startServer && opts.jwtSecret.length < 32) {
|
||||
console.error('ERROR: Please provide a JWT secret at least 32 bytes long');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (startServer && opts.jwtSecret.startsWith('CHANGE-ME')) {
|
||||
console.warn(
|
||||
'WARNING: it appears you secret in your config.json is insecure',
|
||||
);
|
||||
console.warn('DO NOT USE IN PRODUCTION');
|
||||
}
|
||||
|
||||
export const buildRedisOpts = (baseConfig: RedisConfig) => {
|
||||
const redisOpts: RedisOptions = {
|
||||
|
|
Loading…
Reference in New Issue