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

asxpi/datacenterbingo now exports the app (bundlerEnv) and a module
running it as a hardened systemd service. services runs it on :3002
next to the container on ops; no route yet. It reaches Postgres and
Garage on ops over the private network: pg_hba lets the read-only bingo
role in from 10.10.0.20 (this restarts Postgres once), and its secrets,
copied from the container's environment, 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 13:52:15 +04:00
commit 0b30461938
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -2,7 +2,7 @@
# ../../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;
@ -10,8 +10,23 @@
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";
};
};
asxpio.security.ports = [
"tcp/8081/nginx"
"tcp/8082/nginx"
"tcp/3002/ruby"
];
}