2
0
Fork 0

nix: properly compile theme assets on preStart

This commit is contained in:
D Anzorge 2023-03-17 16:06:06 +01:00
parent 7d818c4c9f
commit fd89293939

View file

@ -398,14 +398,13 @@ in
WorkingDirectory = cfg.stateDir;
};
# TODO: Maybe populate static assets at bookwyrm build time?
preStart = ''
${concatStringsSep "\n" (mapAttrsToList (n: v: ''export ${n}="$(cat ${escapeShellArg v})"'') envSecrets)}
${bookwyrm}/libexec/bookwyrm/manage.py migrate --noinput
# ${bookwyrm}/libexec/bookwyrm/update.sh
${bookwyrm}/libexec/bookwyrm/manage.py collectstatic --noinput --clear
# --use-storage will output directly to STATIC_ROOT; without it, the sass processor
# will try to write to the Nix store
${bookwyrm}/libexec/bookwyrm/manage.py compilescss --use-storage
${bookwyrm}/libexec/bookwyrm/manage.py compile_themes
'';
script = ''