(ops) Install pobsync-manage for native management commands
Add a pobsync-manage wrapper that loads the native environment file before running Django management commands, so production commands use the same database and runtime settings as the systemd services. Install the wrapper from the systemd installer, use it for migrations, static collection, SSH key setup, and superuser creation, and document it in the README for operational commands.
This commit is contained in:
11
README.md
11
README.md
@@ -43,6 +43,7 @@ The installer will, by default:
|
||||
- copy the checkout to `/opt/pobsync/app`
|
||||
- create `/opt/pobsync/venv`
|
||||
- write `/etc/pobsync/pobsync.env` if it does not exist
|
||||
- install `pobsync-manage`, a Django management wrapper that loads `/etc/pobsync/pobsync.env`
|
||||
- create `/var/lib/pobsync`, `/var/log/pobsync`, and the backup root
|
||||
- install Python dependencies
|
||||
- run migrations and collect static files
|
||||
@@ -127,7 +128,15 @@ http://127.0.0.1:8010/
|
||||
Create a superuser if needed:
|
||||
|
||||
```
|
||||
sudo -u pobsync /opt/pobsync/venv/bin/python /opt/pobsync/app/manage.py createsuperuser
|
||||
sudo -u pobsync pobsync-manage createsuperuser
|
||||
```
|
||||
|
||||
For other Django management commands on native installs, use `pobsync-manage` so the production environment file is
|
||||
loaded before Django starts:
|
||||
|
||||
```
|
||||
sudo -u pobsync pobsync-manage showmigrations pobsync_backend
|
||||
sudo -u pobsync pobsync-manage check
|
||||
```
|
||||
|
||||
The UI includes:
|
||||
|
||||
Reference in New Issue
Block a user