fix STATICFILES_DIRS
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jeffrey C. Ollie 2023-05-23 22:44:40 -05:00
parent a48414255f
commit aee8db67d6
Signed by: jeff
GPG key ID: 6F86035A6D97044E

View file

@ -51,6 +51,7 @@
localSettings = pkgs.writeText "local_settings.py" '' localSettings = pkgs.writeText "local_settings.py" ''
import os import os
STATIC_ROOT = os.getenv("STATIC_ROOT") STATIC_ROOT = os.getenv("STATIC_ROOT")
STATICFILES_DIRS = [ STATIC_ROOT ]
SECRET_KEY_FILE = os.getenv("SECRET_KEY_FILE") SECRET_KEY_FILE = os.getenv("SECRET_KEY_FILE")
if SECRET_KEY_FILE: if SECRET_KEY_FILE:
with open(SECRET_KEY_FILE, "r") as file: with open(SECRET_KEY_FILE, "r") as file:
@ -94,7 +95,6 @@
mkdir -p $out/app mkdir -p $out/app
cp -r CHANGELOG.md hc manage.py templates $out/app cp -r CHANGELOG.md hc manage.py templates $out/app
chmod +x $out/app/manage.py chmod +x $out/app/manage.py
cp ${localSettings} $out/app/hc/local_settings.py
mkdir -p $doc mkdir -p $doc
cp -r *.md LICENSE $doc cp -r *.md LICENSE $doc
@ -103,6 +103,8 @@
DEBUG=False SECRET_KEY=build-key STATIC_ROOT=$static ${py}/bin/python ./manage.py collectstatic --noinput DEBUG=False SECRET_KEY=build-key STATIC_ROOT=$static ${py}/bin/python ./manage.py collectstatic --noinput
DEBUG=False SECRET_KEY=build-key STATIC_ROOT=$static ${py}/bin/python ./manage.py compress DEBUG=False SECRET_KEY=build-key STATIC_ROOT=$static ${py}/bin/python ./manage.py compress
cp -r static-collected/* $static cp -r static-collected/* $static
cp ${localSettings} $out/app/hc/local_settings.py
''; '';
passthru = { passthru = {
@ -267,5 +269,14 @@
}; };
}; };
checks.${system} = {
webserver = self.packages.${system}.webserver;
smtpd = self.packages.${system}.smtpd;
sendalerts = self.packages.${system}.sendalerts;
sendreports = self.packages.${system}.sendreports;
maintenance = self.packages.${system}.maintenance;
migrate = self.packages.${system}.migrate;
static = self.packages.${system}.static;
};
}; };
} }