feat(upbank2firefly): install as a docker container

This commit is contained in:
wi11-holdsworth 2026-01-14 21:33:09 +11:00
parent 4200f49728
commit d9785dcd05
4 changed files with 60 additions and 0 deletions

View file

@ -28,6 +28,7 @@
"readarr" "readarr"
"sonarr" "sonarr"
"syncthing" "syncthing"
"upbank2firefly"
"vaultwarden" "vaultwarden"
# keep-sorted end # keep-sorted end
]; ];

View file

@ -0,0 +1,58 @@
{
config,
pkgs,
...
}:
let
port = 5021;
in
{
virtualisation.oci-containers = {
backend = "docker";
containers.upbank2firefly = {
extraOptions = [
"--network=host"
];
image = "compose2nix/upbank2firefly";
environment = {
FIREFLY_BASEURL = "https://firefly.fi33.buzz";
TZ = "Australia/Melbourne";
};
environmentFiles = [ config.age.secrets.upbank2firefly.path ];
volumes = [
"/srv/upbank2firefly/app:/app:rw"
];
ports = [
"${toString port}:80/tcp"
];
};
};
systemd = {
services = {
"docker-build-upbank2firefly" = {
path = with pkgs; [
docker
git
];
serviceConfig = {
Type = "oneshot";
TimeoutSec = 300;
};
script = ''
cd /srv/upbank2firefly
git pull
docker build -t compose2nix/upbank2firefly .
'';
};
};
};
services.nginx.virtualHosts."upbank2firefly.fi33.buzz" = {
forceSSL = true;
useACMEHost = "fi33.buzz";
locations."/".proxyPass = "http://localhost:${toString port}";
};
age.secrets.upbank2firefly.file = ../../../secrets/upbank2firefly.age;
}

View file

@ -39,6 +39,7 @@ in
"radicale.age".publicKeys = users; "radicale.age".publicKeys = users;
"readarr.age".publicKeys = users; "readarr.age".publicKeys = users;
"sonarr.age".publicKeys = users; "sonarr.age".publicKeys = users;
"upbank2firefly.age".publicKeys = users;
"vaultwarden-admin.age".publicKeys = users; "vaultwarden-admin.age".publicKeys = users;
# keep-sorted end # keep-sorted end
} }

BIN
secrets/upbank2firefly.age Normal file

Binary file not shown.