lamassu: fix misleading adminPort option

- Clarify adminPort is only used in dev mode (port 8070)
- Production mode always uses port 443 (hardcoded upstream)
- Remove unused ADMIN_SERVER_PORT env var (not read by upstream)
- Fix status script to show correct port and use https

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
padreug 2025-12-23 12:02:33 +01:00
parent 471a4d982f
commit 1383421991

View file

@ -43,7 +43,11 @@ in
adminPort = mkOption {
type = types.port;
default = 8070;
description = "Port for the lamassu admin interface";
description = ''
Port for the lamassu admin interface in dev mode.
Only used when devMode = true. In production mode, the admin
interface always runs on port 443 (hardcoded in upstream).
'';
};
dataDir = mkOption {
@ -426,7 +430,6 @@ in
environment = {
NODE_ENV = "production";
ADMIN_SERVER_PORT = toString cfg.adminPort;
LOG_LEVEL = cfg.logLevel;
HOSTNAME = cfg.hostname;
CA_PATH = cfg.certPath;
@ -509,8 +512,8 @@ in
sudo -u ${cfg.database.user} ${pkgs.postgresql}/bin/psql -d ${cfg.database.name} -c "SELECT version();"
echo ""
echo "=== Network Access ==="
echo "Server: http://localhost:${toString cfg.serverPort}"
echo "Admin: http://localhost:${toString cfg.adminPort}"
echo "Server API: https://localhost:${toString cfg.serverPort}"
echo "Admin UI: https://localhost:${if cfg.devMode then toString cfg.adminPort else "443"}"
'')
];
};