mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-17 18:15:10 +01:00
move uptime
This commit is contained in:
parent
b695131065
commit
1a2f1dfbfa
12 changed files with 89 additions and 53 deletions
35
newinfra/nix/apps/uptime/default.nix
Normal file
35
newinfra/nix/apps/uptime/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, config, ... }: {
|
||||
virtualisation.oci-containers.containers.uptime = {
|
||||
/*
|
||||
uptime:
|
||||
container_name: uptime
|
||||
image: "docker.noratrieb.dev/uptime:50d15bc4"
|
||||
restart: always
|
||||
volumes:
|
||||
- "/apps/uptime:/app/config"
|
||||
environment:
|
||||
UPTIME_CONFIG_PATH: /app/config/uptime.json
|
||||
ports:
|
||||
- "5010:3000"
|
||||
*/
|
||||
|
||||
image = "docker.noratrieb.dev/uptime:50d15bc4";
|
||||
volumes = [
|
||||
"${./uptime.json}:/uptime.json"
|
||||
"/var/lib/uptime:/data"
|
||||
];
|
||||
environment = {
|
||||
UPTIME_CONFIG_PATH = "/uptime.json";
|
||||
};
|
||||
ports = [ "5010:3000" ];
|
||||
login = {
|
||||
registry = "docker.noratrieb.dev";
|
||||
username = "nils";
|
||||
passwordFile = config.age.secrets.docker_registry_password.path;
|
||||
};
|
||||
};
|
||||
|
||||
system.activationScripts.makeUptimeDir = lib.stringAfter [ "var" ] ''
|
||||
mkdir -p /var/lib/uptime/
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue