Add manage.py initdb as ExecStartPre in Bookwyrm systemd unit

This commit is contained in:
Reinout Meliesie 2025-03-09 14:54:48 +01:00
parent 2c4e099347
commit 4552db0453
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6

View file

@ -16,6 +16,7 @@ with pkgs . kernelmaft ;
ExecStartPre=${coreutils-full}/bin/ln -sf ${bookwyrm}/var/lib/bookwyrm/VERSION /var/lib/bookwyrm/
ExecStartPre=${bookwyrm}/bin/bookwyrm-env ${python311}/bin/python ${bookwyrm}/lib/python3.11/manage.py migrate
ExecStartPre=${bookwyrm}/bin/bookwyrm-env ${python311}/bin/python ${bookwyrm}/lib/python3.11/manage.py initdb
ExecStart=${bookwyrm}/bin/bookwyrm-env ${bookwyrm}/bin/bookwyrm
WorkingDirectory=/var/lib/bookwyrm