services: run asxpio from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 26s

asxpi/asxpio now exports the app (bundlerEnv, ImageMagick 7) and a
module running the site and its monitor worker as hardened systemd
services. services runs the site on :3001 next to the container on ops;
no route yet, and the monitor stays off until the container's stops.
pg_hba lets the asxpio role in from 10.10.0.20 too (restarts Postgres
once); the settings and secrets, copied from the container's
environment with the database and Garage on ops' private address, are
in services' sops file. Renovate automerges its bumps like the other
apps'.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-11-17 14:12:45 +04:00
commit 0ee1c600e6
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
2 changed files with 64 additions and 6 deletions

View file

@ -26,7 +26,7 @@ in
authentication = ''
host all all 10.88.0.0/16 scram-sha-256
host all all 10.89.0.0/16 scram-sha-256
host asxpio bingo 10.10.0.20/32 scram-sha-256
host asxpio bingo,asxpio 10.10.0.20/32 scram-sha-256
'';
};
networking.firewall.interfaces."podman*".allowedTCPPorts = [ 5432 ];

View file

@ -24,9 +24,24 @@
};
};
# The site, invoices and admin (asxp.io, admin.asxp.io), owner of the
# asxpio database and the invoice and photo buckets on asxpio-ops. Its
# monitor worker starts when the container's stops: two would record
# every sample twice.
sops.secrets."asxpio/env".restartUnits = [
"asxpio.service"
"asxpio-monitor.service"
];
services.asxpio = {
enable = true; # :3001
environmentFile = config.sops.secrets."asxpio/env".path;
monitor.enable = false;
};
asxpio.security.ports = [
"tcp/8081/nginx"
"tcp/8082/nginx"
"tcp/3002/puma"
"tcp/3001/puma"
];
}