update to 3.0.1

This commit is contained in:
Jeffrey C. Ollie 2023-11-26 09:00:03 -06:00
parent 0e07f409c1
commit c03c2e9885
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 286 additions and 290 deletions

View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1697851979,
"narHash": "sha256-lJ8k4qkkwdvi+t/Xc6Fn74kUuobpu9ynPGxNZR6OwoA=",
"lastModified": 1700851152,
"narHash": "sha256-3PWITNJZyA3jz5IGREJRfSykM6xSLmD8u5A3WpBCyDM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5550a85a087c04ddcace7f892b0bdc9d8bb080c8",
"rev": "1216a5ba22a93a4a3a3bfdb4bff0f4727c576fcc",
"type": "github"
},
"original": {

View file

@ -7,8 +7,10 @@
};
};
outputs = { self, nixpkgs }@inputs:
let
outputs = {
self,
nixpkgs,
} @ inputs: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
@ -16,8 +18,7 @@
py = pkgs.python3.override {
packageOverrides = final: prev: {
django = prev.django_4;
cronsim =
let
cronsim = let
version = "2.5";
pname = "cronsim";
src = pkgs.fetchPypi {
@ -44,7 +45,7 @@
config = {
User = "5000:5000";
Volumes = {
"/tmp" = { };
"/tmp" = {};
};
WorkingDir = "${self.packages.${system}.healthchecks}/app";
Env = [
@ -56,14 +57,12 @@
];
};
};
in
{
in {
packages.${system} = {
healthchecks =
let
healthchecks = let
pname = "healthchecks";
version = "3.0";
hash = "sha256-1xEWsNl1Gs+Xb5+KIZhnVrK4yT4CcVPfHEBP5EYQAD0=";
version = "3.0.1";
hash = "sha256-r8wzIZPetnTEJDKPx/Oxk+gzs8gbjEHSi40LSxLb1Js=";
localSettings = pkgs.writeText "local_settings.py" ''
import os
CSRF_TRUSTED_HOSTS = os.getenv("CSRF_TRUSTED_HOSTS", "").split(",")
@ -97,7 +96,7 @@
inherit pname version propagatedBuildInputs;
format = "other";
outputs = [ "out" "static" "doc" ];
outputs = ["out" "static" "doc"];
src = pkgs.fetchFromGitHub {
owner = "healthchecks";
@ -154,7 +153,7 @@
"2525"
];
ExposedPorts = {
"2525/tcp" = { };
"2525/tcp" = {};
};
};
}
@ -168,7 +167,7 @@
"${self.packages.${system}.healthchecks}/app/manage.py"
"sendalerts"
];
ExposedPorts = { };
ExposedPorts = {};
};
}
);
@ -182,13 +181,12 @@
"sendreports"
"--loop"
];
ExposedPorts = { };
ExposedPorts = {};
};
}
);
maintenance =
let
maintenance = let
script = pkgs.writeShellScript "maintenance" ''
CURL_OPTIONS="--fail --silent --show-error --max-time 10 --retry 5 --output /dev/null"
${pkgs.curl}/bin/curl $CURL_OPTIONS http://webserver.healthchecks.svc/ping/$MAINTENANCE_CHECK_UUID/start
@ -206,7 +204,7 @@
Cmd = [
"${script}"
];
ExposedPorts = { };
ExposedPorts = {};
};
}
);
@ -219,15 +217,14 @@
"${self.packages.${system}.healthchecks}/app/manage.py"
"migrate"
];
ExposedPorts = { };
ExposedPorts = {};
};
}
);
webserver =
let
webserver = let
uwsgi = pkgs.uwsgi.override {
plugins = [ "python3" ];
plugins = ["python3"];
};
uwsgi-ini = pkgs.writeTextFile {
name = "uwsgi.ini";
@ -255,7 +252,7 @@
pkgs.dockerTools.buildLayeredImage (
pkgs.lib.attrsets.recursiveUpdate baseImage {
name = "healthchecks-webserver";
fakeRootCommands = '';
fakeRootCommands = '' ;
mkdir /tmp
chmod 0777 /tmp
'';
@ -265,7 +262,7 @@
"${uwsgi-ini}"
];
ExposedPorts = {
"8000/tcp" = { };
"8000/tcp" = {};
};
};
}
@ -283,11 +280,10 @@
"--root=${self.packages.${system}.healthchecks.static}"
];
ExposedPorts = {
"8000/tcp" = { };
"8000/tcp" = {};
};
};
};
};
checks.${system} = {
webserver = self.packages.${system}.webserver;