File tree Expand file tree Collapse file tree
packages/serveradmin/serveradmin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33source .env
44
5- # Install or update dependencies on every start in case something changed
6- uv sync
5+ # Install or update dependencies on every start in case something changed.
6+ # --inexact keeps packages that were added to the environment out-of-band (e.g.
7+ # an editable overlay installed via $SERVERADMIN_EXTRA_INSTALL below) instead of
8+ # pruning them.
9+ uv sync --inexact
10+
11+ # Optional local overlay: install an additional editable package (e.g. a private
12+ # bundle of serveradmin_* apps) into the same environment. Set via a git-ignored
13+ # docker-compose.override.yml so the open source setup is unaffected.
14+ if [ -n " $SERVERADMIN_EXTRA_INSTALL " ]; then
15+ echo " Installing extra package from $SERVERADMIN_EXTRA_INSTALL "
16+ uv pip install -e " $SERVERADMIN_EXTRA_INSTALL "
17+ fi
718
819# Some users prefer to develop on their host rather than containers and have adjusted .env
920if [ $POSTGRES_HOST == " localhost" ]; then
Original file line number Diff line number Diff line change @@ -49,3 +49,6 @@ __pycache__/
4949# The settings file
5050/packages /serveradmin /serveradmin /local_settings.py
5151
52+ # Local docker-compose overlay (e.g. to mount/install a private app bundle)
53+ /docker-compose.override.yml
54+
Original file line number Diff line number Diff line change 7575 'compressor' ,
7676]
7777
78+ # Automatically register optional serveradmin_* Django apps that happen to be
79+ # installed in the environment (for example the private serveradmin-extras
80+ # bundle). This follows the same naming convention already used to auto-wire
81+ # their URLs in urls.py and their servershell plugins in servershell/utils.py,
82+ # so simply installing such a package is enough to activate it - no manual
83+ # INSTALLED_APPS editing required. Open source setups without any such package
84+ # installed are unaffected.
85+ import pkgutil
86+
87+ INSTALLED_APPS += sorted (
88+ name
89+ for _ , name , is_package in pkgutil .iter_modules ()
90+ if is_package
91+ and name .startswith ('serveradmin_' )
92+ and name not in INSTALLED_APPS
93+ )
94+
7895MENU_TEMPLATES = [
7996 'servershell/menu.html' ,
8097 'resources/menu.html' ,
You can’t perform that action at this time.
0 commit comments