fix: Set default site for socketio using env var
This commit is contained in:
parent
b181b69894
commit
5c7197a790
1 changed files with 5 additions and 2 deletions
|
|
@ -27,7 +27,10 @@ function get_conf() {
|
||||||
read_config('config.json');
|
read_config('config.json');
|
||||||
read_config('sites/common_site_config.json');
|
read_config('sites/common_site_config.json');
|
||||||
|
|
||||||
// detect current site
|
// set default site
|
||||||
|
if (process.env.FRAPPE_SITE) {
|
||||||
|
conf.default_site = process.env.FRAPPE_SITE;
|
||||||
|
}
|
||||||
if (fs.existsSync('sites/currentsite.txt')) {
|
if (fs.existsSync('sites/currentsite.txt')) {
|
||||||
conf.default_site = fs.readFileSync('sites/currentsite.txt').toString().trim();
|
conf.default_site = fs.readFileSync('sites/currentsite.txt').toString().trim();
|
||||||
}
|
}
|
||||||
|
|
@ -44,4 +47,4 @@ function get_redis_subscriber() {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
get_conf,
|
get_conf,
|
||||||
get_redis_subscriber
|
get_redis_subscriber
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue