Take single site down for port based multi tenancy - jigneshpshah/greycube_helpmanual GitHub Wiki
In Port based multi tenancy the site which is set in use can be taken down.
- Add File maintenance_on.html at location
/home/frappe/frappe-bench/sites/site1.local/maintenance_on.html
the path can be different , based on this path the condition is set to check if file exist
- Go to
/home/frappe/frappe-bench/config
open nginx.conf
go to
location / {
try_files /demo.flexone.com/public/$uri @webserver;
}
add if condition to check if the file is available as below raise error 503
location / {
if (-f /home/frappe/frappe-bench/sites/site1.local/maintenance_on.html) {
return 503;
}
try_files /demo.flexone.com/public/$uri @webserver;
}
- handle error 503 error by adding the below code
error_page 503 /maintenance_on.html;
location = /maintenance_on.html {
root /home/frappe/frappe-bench/sites/site1.local;
}
- run command
sudo service nginx restart
- Check the current site e.g. http://142.93.27.142:82/login#login it will be down, while all other sites will be up