Merge remote-tracking branch 'refs/remotes/origin/master'

This commit is contained in:
jacekpoz 2024-07-19 21:05:06 +02:00
commit 1aa7222be4
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
3 changed files with 52 additions and 23 deletions

View file

@ -1928,11 +1928,11 @@
]
},
"locked": {
"lastModified": 1716656108,
"narHash": "sha256-DyBZoOO9ayXzvj3dNf47EvRZq/3ep/i71z4R0FkrW10=",
"lastModified": 1721236649,
"narHash": "sha256-aQCYsCicXN/p4VAYmWNvB7m4JLBOssHV9Lfa/L6VU/A=",
"ref": "refs/heads/master",
"rev": "3d0d0da61adce29297658ee1e5930c092251398a",
"revCount": 22,
"rev": "2f8dd60760275c9bb94fd4d7d3510088c8d78ae0",
"revCount": 23,
"type": "git",
"url": "https://git.jacekpoz.pl/jacekpoz/nte"
},
@ -3676,11 +3676,11 @@
"nte": "nte"
},
"locked": {
"lastModified": 1719149812,
"narHash": "sha256-EYFzAYAvC+3Xe5TrzKpoF8C/51tnVPaD4TSv6ZBkGU8=",
"lastModified": 1721295130,
"narHash": "sha256-QmlIJfgFZmYpXTDtXpgpapMb0Hw/3ZiK0KPrNCnCq/k=",
"ref": "refs/heads/master",
"rev": "0de6d59fafad70712000636a28c8038d5e3c3a11",
"revCount": 261,
"rev": "3bae9b7288920b305945e882623c87fa0c31f7b7",
"revCount": 282,
"type": "git",
"url": "ssh://jacekpoz/jacekpoz/pozsite.git"
},

View file

@ -1,9 +1,15 @@
{
inputs,
lib,
pkgs,
...
}: let
inherit (lib) getExe';
systemctl = getExe' pkgs.systemd "systemctl";
port = 4827;
sitePath = "/srv/web/jacekpoz.pl";
in {
services.caddy = {
enable = true;
@ -28,15 +34,18 @@ in {
group = "site";
};
systemd.services.pozback = {
systemd = {
services = {
pozback = {
description = "The backend for jacekpoz.pl";
wantedBy = ["default.target"];
after = ["network.target"];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${inputs.pozsite.packages.${pkgs.system}.pozback}/bin/back";
Restart = "on-failure";
Environment = ''POZ_PORT="${toString port}" POZ_DIR="/srv/web/jacekpoz.pl"'';
Environment = ''POZ_PORT="${toString port}" POZ_DIR="${sitePath}"'';
User = "site";
Group = "site";
};
@ -46,4 +55,25 @@ in {
colorized-logs
];
};
pozback-watcher = {
description = "Restarter for the backend";
after = ["network.target"];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
ExecStart = "${systemctl} restart pozback.service";
};
};
};
paths.pozback-watcher = {
wantedBy = ["multi-user.target"];
pathConfig = {
PathModified = sitePath;
Unit = "pozback-watcher.service";
};
};
};
}

View file

@ -18,7 +18,6 @@ in {
inherit port;
max_request_size = 100000000;
conduit_cache_capacity_modifier = 4.0;
rocksdb_max_open_files = 20;
allow_check_for_updates = false;
allow_registration = false;
};