Add build phase to compile localization messages during the build process

This commit is contained in:
Philip Henning 2025-07-08 23:11:37 +02:00
parent d6d630dd30
commit 9797415f0c

View file

@ -313,6 +313,16 @@
cp ${settingsLocal} bitpoll/settings_local.py
'';
buildPhase = ''
runHook preBuild
# Compile localization messages during build to avoid runtime write issues
export PYTHONPATH=$PWD:$PYTHONPATH
${pythonEnv}/bin/python manage.py compilemessages
runHook postBuild
'';
installPhase = ''
runHook preInstall
@ -482,9 +492,6 @@
# Collect static files
${cfg.package}/bin/bitpoll-manage collectstatic --noinput --clear
# Compile messages
${cfg.package}/bin/bitpoll-manage compilemessages
'';
serviceConfig = {