hackens-org-configurations/machines/hackens-org/orga/static-assets.nix
2024-01-12 16:19:31 +01:00

10 lines
363 B
Nix

{ pkgs, python, source, app, envPrefix ? ""}:
pkgs.runCommand "django-static" { } ''
mkdir -p $out/static
export ${envPrefix}SECRET_KEY="collectstatic"
export ${envPrefix}STATIC_ROOT=$out/static
export ${envPrefix}DEBUG=0
export ${envPrefix}ALLOWED_HOSTS=
export ${envPrefix}DB_FILE=
${python}/bin/python ${source}/${app}/manage.py collectstatic
''