Removed nginx container. Added supervisord and nginx to build.
This commit is contained in:
3
app/entrypoint.sh
Normal file → Executable file
3
app/entrypoint.sh
Normal file → Executable file
@@ -11,6 +11,5 @@ python manage.py collectstatic --noinput
|
||||
python manage.py migrate --noinput
|
||||
python manage.py ensure_admin
|
||||
|
||||
exec gunicorn keywarden.wsgi:application --bind 0.0.0.0:80 --workers 3
|
||||
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||
|
||||
|
||||
4
app/scripts/gunicorn.sh
Executable file
4
app/scripts/gunicorn.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
exec gunicorn keywarden.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
||||
File diff suppressed because one or more lines are too long
@@ -10,8 +10,41 @@ window.addEventListener("load", (e) => {
|
||||
warnWithoutSaving();
|
||||
|
||||
tabNavigation();
|
||||
|
||||
scrollSidebarNav();
|
||||
});
|
||||
|
||||
/*************************************************************
|
||||
* Scroll sidebar to active item
|
||||
*************************************************************/
|
||||
function scrollSidebarNav() {
|
||||
const sidebarNav = document.getElementById("nav-sidebar-apps");
|
||||
|
||||
if (!sidebarNav) {
|
||||
return;
|
||||
}
|
||||
|
||||
const instance = SimpleBar.instances.get(sidebarNav);
|
||||
const activeItem = sidebarNav.querySelector("a.active");
|
||||
|
||||
if (!instance || !activeItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
function isActiveItemVisible() {
|
||||
const sidebarRect = sidebarNav.getBoundingClientRect();
|
||||
const itemRect = activeItem.getBoundingClientRect();
|
||||
|
||||
return (
|
||||
itemRect.top >= sidebarRect.top && itemRect.bottom <= sidebarRect.bottom
|
||||
);
|
||||
}
|
||||
|
||||
if (instance && !isActiveItemVisible()) {
|
||||
instance.getScrollElement().scroll(0, activeItem.offsetTop);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* Move not visible tab items to dropdown
|
||||
*************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user