Update install.py to handle external django apps with server mode#11627
Conversation
…o for server* installs run migration before postinstall
|
Windows Action |
|
Makes sense to me. When the tests are green consider it approved. |
|
Windows Action fails: |
|
Linux devel server installation: https://github.com/gem/oq-engine/actions/runs/29647261456 |
|
The devel server is not more available on docker container: https://github.com/gem/oq-engine/actions/runs/29748728805 |
|
MacOS devel installation, It is correct that all this migration on devel installation? https://github.com/gem/oq-engine/actions/runs/29770604234/job/88447453040#step:5:388 Do we need auth for a devel installation? |
|
Windows devel installation: And the action fail: |
|
Server installation: We could add it to all PRs; had that been the case, we would have spotted the existing errors. |
|
Run also of extended tests: |
Add a USER field to all four installation mode classes - for server and server_devel this indicates the user who should own db and other files. Pass inst to all relevant functions.
Use VENV openquake/server/manage.py rather than django-admin + env vars; in server mode we need to run some commands as root but others as openquake, running sudo while also changing the environment is uncomfortable. Manage.py already has the correct environment settings and so can be used with sudo more easily.
Run migrations before running app postinstall scripts
Some code cleanup in install_or_postinstall_standalone required. Not yet tested on Windows/mac.