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
47 lines
1.5 KiB
Nix
47 lines
1.5 KiB
Nix
# The apps, built from their own repositories' flakes (inputs in
|
|
# ../../flake.nix) and served here; Traefik on asxpio-ops routes to them
|
|
# over the private network (asxpio.routes there). A release is a bump of
|
|
# the app's input in flake.lock.
|
|
{ config, ... }:
|
|
{
|
|
# A new or changed virtual host reloads nginx instead of restarting it
|
|
services.nginx.enableReload = true;
|
|
|
|
services.blog.enable = true; # :8081
|
|
services.czsk.enable = true; # :8082
|
|
|
|
# Read-only: the bingo role on Postgres and a read-only key for the
|
|
# photo bucket, both on asxpio-ops
|
|
sops.secrets."datacenterbingo/env".restartUnits = [ "datacenterbingo.service" ];
|
|
services.datacenterbingo = {
|
|
enable = true; # :3002
|
|
environmentFile = config.sops.secrets."datacenterbingo/env".path;
|
|
environment = {
|
|
BINGO_HOST = "datacenterbingo.xyz";
|
|
S3_ENDPOINT = "http://10.10.0.10:3900";
|
|
S3_REGION = "us-east-1";
|
|
S3_BUCKET = "datacenterbingo-photos";
|
|
};
|
|
};
|
|
|
|
# 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"
|
|
];
|
|
}
|