mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-02 05:42:15 +00:00
healthchecks: django compress before collectstatic
Previously, collectstatic was called before compress, causing it to miss certain libraries (namely moment.js) that prevent the Events list from displaying properly. This also matches the suggested order in the healthchecks documentation: > Management commands that need to be run during each version upgrade. > - manage.py compress – creates combined JS and CSS bundles and places them in the static-collected directory. > - manage.py collectstatic – collects static files in the static-collected directory.
This commit is contained in:
@@ -239,11 +239,14 @@ in
|
||||
|
||||
serviceConfig = commonConfig // {
|
||||
Restart = "always";
|
||||
ExecStartPre = [
|
||||
"${pkg}/opt/healthchecks/manage.py collectstatic --no-input"
|
||||
"${pkg}/opt/healthchecks/manage.py remove_stale_contenttypes --no-input"
|
||||
]
|
||||
++ lib.optionals (cfg.settings.DEBUG != "True") [ "${pkg}/opt/healthchecks/manage.py compress" ];
|
||||
ExecStartPre =
|
||||
lib.optionals (cfg.settings.DEBUG != "True") [
|
||||
"${pkg}/opt/healthchecks/manage.py compress"
|
||||
]
|
||||
++ [
|
||||
"${pkg}/opt/healthchecks/manage.py collectstatic --no-input"
|
||||
"${pkg}/opt/healthchecks/manage.py remove_stale_contenttypes --no-input"
|
||||
];
|
||||
ExecStart = ''
|
||||
${pkgs.python3Packages.gunicorn}/bin/gunicorn hc.wsgi \
|
||||
--bind ${cfg.listenAddress}:${toString cfg.port} \
|
||||
|
||||
Reference in New Issue
Block a user